<commit_before># coding=UTF-8

"""
Forms and validation code for user registration.

"""


from django import newforms as forms
from django.core.validators import alnum_re
from django.utils.translation import ugettext as _
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse

from members.models import RegistrationProfile, UserProfile, EmailChangeRequest

from WTForm import WTForm, Fieldset, Columns

from core import models as coremodel

attrs_dict = { 'class': 'required' }

class ProfileChangeEmailForm(forms.Form):
    """
    Change email form
    """
    new_email = forms.EmailField(max_length=75,
                                widget=forms.TextInput(),
                                label=_(u'Email'))
    password = forms.CharField(max_length=255,
                               widget=forms.PasswordInput(),
                               label=_(u'Kodeord'))
    
    def __init__(self, data=None, auto_id='id_%s', prefix=None, initial=None, user=None):
        super(ProfileChangeEmailForm, self).__init__(data=data, auto_id=auto_id, prefix=prefix, initial=initial)
        
        self.userModel = user
    <commit_msg>Fjernet en gammel dependency på WTForm<commit_after># coding=UTF-8

"""
Forms and validation code for user registration.

"""


from django import newforms as forms
from django.core.validators import alnum_re
from django.utils.translation import ugettext as _
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse

from members.models import RegistrationProfile, UserProfile, EmailChangeRequest

from core import models as coremodel

attrs_dict = { 'class': 'required' }

class ProfileChangeEmailForm(forms.Form):
    """
    Change email form
    """
    new_email = forms.EmailField(max_length=75,
                                widget=forms.TextInput(),
                                label=_(u'Email'))
    password = forms.CharField(max_length=255,
                               widget=forms.PasswordInput(),
                               label=_(u'Kodeord'))
    
    def __init__(self, data=None, auto_id='id_%s', prefix=None, initial=None, user=None):
        super(ProfileChangeEmailForm, self).__init__(data=data, auto_id=auto_id, prefix=prefix, initial=initial)
        
        self.userModel = user
    
{'fraction_non_alphanumeric': 0.09180609180609181, 'fraction_numerical': 0.005148005148005148, 'mean_word_length': 2.8545454545454545, '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': '3575275', 'n_tokens_mistral': 651, 'n_tokens_neox': 633, 'n_words': 159}