Commit bca79a5e authored by Weblate's avatar Weblate

Merge remote-tracking branch 'origin/master'

parents ede6b5db 994bb972
......@@ -79,6 +79,7 @@ class UsernameField(forms.RegexField):
'numbers and following characters: @ . + - _'
)
}
kwargs['required'] = True
self.valid = None
super(UsernameField, self).__init__(*args, **kwargs)
......@@ -87,6 +88,7 @@ class UsernameField(forms.RegexField):
'''
Username validation, requires length of five chars and unique.
'''
if value is not None:
existing = User.objects.filter(
username__iexact=value
)
......
......@@ -293,6 +293,7 @@ class ProfileTest(ViewTestCase):
'first_name': 'First',
'last_name': 'Last',
'email': 'noreply@weblate.org',
'username': 'testik',
}
)
self.assertRedirects(response, reverse('profile'))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment