You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
479 B

10 years ago
10 years ago
10 years ago
10 years ago
  1. from django import forms
  2. class LowercaseEmailField(forms.EmailField):
  3. def clean(self, value):
  4. value = super(LowercaseEmailField, self).clean(value)
  5. return value.lower()
  6. class EmailPasswordForm(forms.Form):
  7. email = LowercaseEmailField()
  8. password = forms.CharField(required=False)
  9. class ReportSettingsForm(forms.Form):
  10. reports_allowed = forms.BooleanField(required=False)
  11. class SetPasswordForm(forms.Form):
  12. password = forms.CharField()