Added 'Forgot Password' function.

This commit is contained in:
2018-03-08 15:36:29 +01:00
parent 13160bce7e
commit 1e4221fbf2
7 changed files with 79 additions and 4 deletions

View File

@@ -62,3 +62,15 @@ class SetPasswordForm(forms.Form):
if commit:
self.user.save()
return self.user
class ResetPasswordForm(forms.Form):
username = auth_forms.UsernameField(
max_length=254,
label=_(u'E-Mail-Adresse'),
widget=forms.TextInput(attrs={'autofocus': True}),
)
def clean_username(self):
username = self.cleaned_data.get('username')
return username.lower()