<commit_before>from decimal import Decimal as D

from django import forms

from core import models


class NewIndividualMember(forms.Form):
    name = forms.CharField(label='Nombre')
    surname = forms.CharField(label='Apellidos')
    phone = forms.CharField(label='Teléfono')
    adress = forms.CharField(label='Dirección')
    mail = forms.EmailField(label='Correo electrónico')
    id_number = forms.CharField(label='DNI')

    membership_fee = D('15.00')

    def execute(self):
        cleaned_data = self.cleaned_data
        membership = models.Membership.objects.create(membership_fee=self.membership_fee)
        person = models.Person.objects.create(
            name=cleaned_data['name'],
            surname=cleaned_data['surname'],
            phone_number=cleaned_data['phone'],
            address_street=cleaned_data['adress'],
            id_number=cleaned_data['id_number'],
            email=cleaned_data['mail'])
        models.PersonMembership.objects.create(person=person, membership=membership)

        return membership


class NewFamilyMember(forms.Form):

    name1 = forms.CharField()
    phone1 = forms.CharField()
    surname1 = forms.CharField()
    id_number1 = forms.CharField()
    mail1 = forms.CharField()

    name2 = forms.CharField()
    phone2 = forms.CharField()
    surname2 = forms.CharField()
    id_number2 = forms.CharField()
    mail2 = forms.CharField()

    name3 = forms.CharField()
    phone3 = forms.CharField()
    surname3 = forms.CharField()
    id_number3 = forms.CharField()
    mail3 = forms.CharField()

    name4 = forms.CharField()
    phone4 = forms.CharField()
    surname4 = forms.CharField()
    id_number4 = forms.CharField()
    mail4 = forms.CharField()

    membership_fee = D('40.00')

    def execute(self):
        cleaned_data = self.cleaned_data
        membership = models.Membership.objects.create(membership_fee=self.membership_fee)<commit_msg>Añade etiquetas<commit_after>from decimal import Decimal as D

from django import forms

from core import models


class NewIndividualMember(forms.Form):
    name = forms.CharField(label='Nombre')
    surname = forms.CharField(label='Apellidos')
    phone = forms.CharField(label='Teléfono')
    adress = forms.CharField(label='Dirección')
    mail = forms.EmailField(label='Correo electrónico')
    id_number = forms.CharField(label='DNI')

    membership_fee = D('15.00')

    def execute(self):
        cleaned_data = self.cleaned_data
        membership = models.Membership.objects.create(membership_fee=self.membership_fee)
        person = models.Person.objects.create(
            name=cleaned_data['name'],
            surname=cleaned_data['surname'],
            phone_number=cleaned_data['phone'],
            address_street=cleaned_data['adress'],
            id_number=cleaned_data['id_number'],
            email=cleaned_data['mail'])
        models.PersonMembership.objects.create(person=person, membership=membership)

        return membership


class NewFamilyMember(forms.Form):

    name1 = forms.CharField(label='Nombre')
    phone1 = forms.CharField(label='Teléfono')
    surname1 = forms.CharField(label='Apellidos')
    id_number1 = forms.CharField(label='DNI')
    mail1 = forms.CharField(label='Correo electrónico')

    name2 = forms.CharField(label='Nombre')
    phone2 = forms.CharField(label='Teléfono')
    surname2 = forms.CharField(label='Apellidos')
    id_number2 = forms.CharField(label='DNI')
    mail2 = forms.CharField(label='Correo electrónico')

    name3 = forms.CharField(label='Nombre')
    phone3 = forms.CharField(label='Teléfono')
    surname3 = forms.CharField(label='Apellidos')
    id_number3 = forms.CharField(label='DNI')
    mail3 = forms.CharField(label='Correo electrónico')

    name4 = forms.CharField(label='Nombre')
    phone4 = forms.CharField(label='Teléfono')
    surname4 = forms.CharField(label='Apellidos')
    id_number4 = forms.CharField(label='DNI')
    mail4 = forms.CharField(label='Correo electrónico')

    membership_fee = D('40.00')

    def execute(self):
        cleaned_data = self.cleaned_data
        membership = models.Membership.objects.create(membership_fee=self.membership_fee)
{'fraction_non_alphanumeric': 0.11956001912960305, 'fraction_numerical': 0.013390722142515544, 'mean_word_length': 3.721218961625282, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7009419', 'n_tokens_mistral': 1357, 'n_tokens_neox': 1311, 'n_words': 202}