1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-27 07:44:50 +00:00

Fiexed long username bug when login

This commit is contained in:
zhengxie
2012-10-15 19:09:53 +08:00
parent 9466dc21dd
commit 1db310e480
2 changed files with 4 additions and 20 deletions

View File

@@ -14,7 +14,7 @@ class AuthenticationForm(forms.Form):
Base class for authenticating users. Extend this to get a form that accepts
username/password logins.
"""
username = forms.CharField(label=_("Username"), max_length=30)
username = forms.CharField(label=_("Username"), max_length=255)
password = forms.CharField(label=_("Password"), widget=forms.PasswordInput)
def __init__(self, request=None, *args, **kwargs):
@@ -55,7 +55,7 @@ class AuthenticationForm(forms.Form):
return self.user_cache
class PasswordResetForm(forms.Form):
email = forms.EmailField(label=_("E-mail"), max_length=75)
email = forms.EmailField(label=_("E-mail"), max_length=255)
def clean_email(self):
"""
@@ -96,6 +96,7 @@ class PasswordResetForm(forms.Form):
'token': token_generator.make_token(user),
'protocol': use_https and 'https' or 'http',
}
send_mail(_("Password reset on %s") % site_name,
t.render(Context(c)), None, [user.username])