Commits

Anonymous committed 9b8a9df

[svn r53] use EmailField where it's a mail. Spotted in issue #23.

Comments (0)

Files changed (1)

django_authopenid/forms.py

     next = forms.CharField(max_length=255,widget=forms.HiddenInput(), required=False)
 
     username = forms.CharField(max_length=30, widget=forms.widgets.TextInput(attrs=attrs_dict))
-    email = forms.CharField(max_length=255, widget=forms.widgets.TextInput(attrs=attrs_dict))
+    email = forms.EmailField(widget=forms.TextInput(attrs=dict(attrs_dict, maxlength=200))
     
     def clean_username(self):
         if 'username' in self.cleaned_data:
         
 class ChangeemailForm(forms.Form):
     """ change email form """
-    email = forms.CharField(max_length=255,widget=forms.TextInput(attrs={'class': "required validate-email" }))
+    email = forms.EmailField(widget=forms.TextInput(attrs=dict(attrs_dict, 
+        maxlength=200))
     password = forms.CharField(widget=forms.PasswordInput(attrs=attrs_dict))
 
     def __init__(self, data=None, files=None, auto_id='id_%s', prefix=None,