<commit_before>from django.forms import ModelForm
from braces.forms import UserKwargModelFormMixin
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit
from django.core.urlresolvers import reverse
from .models import Signature


class SignatureForm(UserKwargModelFormMixin, ModelForm):

    def __init__(self, *args, **kwargs):
        super(SignatureForm, self).__init__(*args, **kwargs)
        self.helper = FormHelper()
        self.helper.form_action = reverse('petition:create')
        self.helper.form_method = 'post'
        self.helper.add_input(Submit('submit', 'Submit'))

    class Meta:
        model = Signature
        fields = ['name', 'email', 'city', 'telephone', 'location', 'lat', 'lng']<commit_msg>GIODO aggrement added to form<commit_after>from django.forms import ModelForm
from django import forms
from braces.forms import UserKwargModelFormMixin
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit
from django.core.urlresolvers import reverse
from .models import Signature


class SignatureForm(UserKwargModelFormMixin, ModelForm):
    giodo = forms.BooleanField(widget=forms.CheckboxInput(), required=True,
        label="We want process you ID data. Do you accept it?")

    def __init__(self, *args, **kwargs):
        super(SignatureForm, self).__init__(*args, **kwargs)
        self.helper = FormHelper()
        self.helper.form_action = reverse('petition:create')
        self.helper.form_method = 'post'
        self.helper.add_input(Submit('submit', 'Submit'))

    class Meta:
        model = Signature
        fields = ['name', 'email', 'city', 'telephone', 'location', 'lat', 'lng', 'giodo']
{'fraction_non_alphanumeric': 0.11196682464454977, 'fraction_numerical': 0.0, 'mean_word_length': 4.261682242990654, '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': '2993521', 'n_tokens_mistral': 496, 'n_tokens_neox': 482, 'n_words': 129}