ubernostrum / django-registration

A user-registration application for Django.

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"This username is already taken. Please choose another."])},
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"You must type the same password each time"])},
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'You must type the same password each time')
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):