ubernostrum / django-registration
A user-registration application for Django.
Clone this repository (size: 456.0 KB): HTTPS / SSH
$ hg clone http://bitbucket.org/ubernostrum/django-registration/
| commit 362: | b23495f19be3 |
| parent 361: | 40f4bf16be0f |
| branch: | default |
Clean up a little bit after the translation changes yesterday.
5 months ago
Changed (Δ22 bytes):
raw changeset »
registration/forms.py (1 lines added, 1 lines removed)
registration/tests/forms.py (2 lines added, 2 lines removed)
registration/tests/views.py (1 lines added, 1 lines removed)
Up to file-list registration/forms.py:
| … | … | @@ -33,7 +33,7 @@ class RegistrationForm(forms.Form): |
33 |
33 |
max_length=30, |
34 |
34 |
widget=forms.TextInput(attrs=attrs_dict), |
35 |
35 |
label=_("Username"), |
36 |
error_messages={ 'invalid': _("This value must contain only letters, numbers and underscores.") |
|
36 |
error_messages={ 'invalid': _("This value must contain only letters, numbers and underscores.") }) |
|
37 |
37 |
email = forms.EmailField(widget=forms.TextInput(attrs=dict(attrs_dict, |
38 |
38 |
maxlength=75)), |
39 |
39 |
label=_("Email address")) |
Up to file-list registration/tests/forms.py:
| … | … | @@ -31,13 +31,13 @@ class RegistrationFormTests(TestCase): |
31 |
31 |
'email': 'alice@example.com', |
32 |
32 |
'password1': 'secret', |
33 |
33 |
'password2': 'secret'}, |
34 |
'error': ('username', [u" |
|
34 |
'error': ('username', [u"A user with that username already exists."])}, |
|
35 |
35 |
# Mismatched passwords. |
36 |
36 |
{'data': {'username': 'foo', |
37 |
37 |
'email': 'foo@example.com', |
38 |
38 |
'password1': 'foo', |
39 |
39 |
'password2': 'bar'}, |
40 |
'error': ('__all__', [u" |
|
40 |
'error': ('__all__', [u"The two password fields didn't match."])}, |
|
41 |
41 |
] |
42 |
42 |
|
43 |
43 |
for invalid_dict in invalid_data_dicts: |
Up to file-list registration/tests/views.py:
| … | … | @@ -78,7 +78,7 @@ class RegistrationViewTests(TestCase): |
78 |
78 |
self.assertEqual(response.status_code, 200) |
79 |
79 |
self.failIf(response.context['form'].is_valid()) |
80 |
80 |
self.assertFormError(response, 'form', field=None, |
81 |
errors=u |
|
81 |
errors=u"The two password fields didn't match.") |
|
82 |
82 |
self.assertEqual(len(mail.outbox), 0) |
83 |
83 |
|
84 |
84 |
def test_registration_view_closed(self): |
