<commit_before># coding=utf-8
from django.conf import settings
from django.views.generic.base import View
from restful.decorators import restful_view_templates
from django.core.mail import send_mail
from django import forms


@restful_view_templates('members')
class MembersView(View):
    def post(self, request):
        form = Form(data=request.params)

        status = 200
        if form.is_valid():
            try:
                # send email
                send_mail(
                    'Включи се нов участник',
                    u'Проект: ' + form.cleaned_data['project'] + "\n" +
                    u'Email: ' + form.cleaned_data['email'] + "\n" +
                    u'Умения: ' + ", ".join(form.cleaned_data['position']) + "\n",
                    '<EMAIL>',
                    ['<EMAIL>'],
                    fail_silently=False
                )
                message = 'Ура! Веднага можете да се включите във Facebook или Github.'
            except:
                status = 400
                message = 'Изникна грешка при получаването на вашата информацията. Моля, опитайте по-късно'
        else:
            status = 500
            message = 'Данните които попълнихте не са валидни'

        return {'status': message}, status


class Form(forms.Form):
    position = forms.MultipleChoiceField(required=True,
                                         choices=settings.MEMBER_POSITIONS.items())
    email = forms.EmailField(required=True)
    project = forms.CharField(required=True)<commit_msg>reverted back to gmail account due to errors.<commit_after># coding=utf-8
from django.conf import settings
from django.views.generic.base import View
from restful.decorators import restful_view_templates
from django.core.mail import send_mail
from django import forms


@restful_view_templates('members')
class MembersView(View):
    def post(self, request):
        form = Form(data=request.params)

        status = 200
        if form.is_valid():
            try:
                # send email
                send_mail(
                    'Включи се нов участник',
                    u'Проект: ' + form.cleaned_data['project'] + "\n" +
                    u'Email: ' + form.cleaned_data['email'] + "\n" +
                    u'Умения: ' + ", ".join(form.cleaned_data['position']) + "\n",
                    '<EMAIL>',
                    ['<EMAIL>'],
                    fail_silently=False
                )
                message = 'Ура! Веднага можете да се включите във Facebook или Github.'
            except:
                status = 400
                message = 'Изникна грешка при получаването на вашата информацията. Моля, опитайте по-късно'
        else:
            status = 500
            message = 'Данните които попълнихте не са валидни'

        return {'status': message}, status


class Form(forms.Form):
    position = forms.MultipleChoiceField(required=True,
                                         choices=settings.MEMBER_POSITIONS.items())
    email = forms.EmailField(required=True)
    project = forms.CharField(required=True)
{'fraction_non_alphanumeric': 0.09876943005181348, 'fraction_numerical': 0.006476683937823834, 'mean_word_length': 1.847004608294931, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4379334', 'n_tokens_mistral': 896, 'n_tokens_neox': 882, 'n_words': 210}