aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/auth/forms.py
diff options
context:
space:
mode:
Diffstat (limited to 'mediagoblin/auth/forms.py')
-rw-r--r--mediagoblin/auth/forms.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/mediagoblin/auth/forms.py b/mediagoblin/auth/forms.py
index 6339b4a3..dcb6766c 100644
--- a/mediagoblin/auth/forms.py
+++ b/mediagoblin/auth/forms.py
@@ -17,7 +17,7 @@
import wtforms
import re
-from mediagoblin.util import fake_ugettext_passthrough as _
+from mediagoblin.tools.translate import fake_ugettext_passthrough as _
class RegistrationForm(wtforms.Form):
@@ -59,9 +59,10 @@ class ForgotPassForm(wtforms.Form):
'Username or email',
[wtforms.validators.Required()])
- def validate_username(form,field):
- if not (re.match(r'^\w+$',field.data) or
- re.match(r'^.+@[^.].*\.[a-z]{2,10}$',field.data, re.IGNORECASE)):
+ def validate_username(form, field):
+ if not (re.match(r'^\w+$', field.data) or
+ re.match(r'^.+@[^.].*\.[a-z]{2,10}$', field.data,
+ re.IGNORECASE)):
raise wtforms.ValidationError(u'Incorrect input')
@@ -82,4 +83,3 @@ class ChangePassForm(wtforms.Form):
token = wtforms.HiddenField(
'',
[wtforms.validators.Required()])
-