mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-22 22:05:50 +00:00
Merge branch 'kaedroho-quick-fix-1665'
This commit is contained in:
commit
c5f72e1ce7
4 changed files with 10 additions and 1 deletions
|
|
@ -46,6 +46,7 @@ Changelog
|
|||
* Fix: Form builder pages now pick up template variables defined in the `get_context` method (Christoph Lipp)
|
||||
* Fix: When copying a page, IDs of child objects within page revision records were not remapped to the new objects; this would cause those objects to be lost from the original page when editing the new one
|
||||
* Fix: Newly added redirects now take effect on all sites, rather than just the site that the Wagtail admin backend was accessed through
|
||||
* Fix: Add user form no longer throws a hard error on validation failure
|
||||
|
||||
|
||||
1.0 (16.07.2015)
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ Bug fixes
|
|||
* Form builder pages now pick up template variables defined in the ``get_context`` method
|
||||
* When copying a page, IDs of child objects within page revision records were not remapped to the new objects; this would cause those objects to be lost from the original page when editing the new one
|
||||
* Newly added redirects now take effect on all sites, rather than just the site that the Wagtail admin backend was accessed through
|
||||
* Add user form no longer throws a hard error on validation failure
|
||||
|
||||
|
||||
Upgrade considerations
|
||||
|
|
|
|||
|
|
@ -43,8 +43,13 @@ class UsernameForm(forms.ModelForm):
|
|||
|
||||
|
||||
class UserCreationForm(UsernameForm):
|
||||
|
||||
required_css_class = "required"
|
||||
|
||||
error_messages = {
|
||||
'duplicate_username': _("A user with that username already exists."),
|
||||
'password_mismatch': _("The two password fields didn't match."),
|
||||
}
|
||||
|
||||
is_superuser = forms.BooleanField(
|
||||
label=_("Administrator"),
|
||||
required=False,
|
||||
|
|
|
|||
|
|
@ -96,6 +96,8 @@ class TestUserCreateView(TestCase, WagtailTestUtils):
|
|||
self.assertEqual(response.status_code, 200)
|
||||
self.assertTemplateUsed(response, 'wagtailusers/users/create.html')
|
||||
|
||||
self.assertTrue(response.context['form'].errors['password2'])
|
||||
|
||||
# Check that the user was not created
|
||||
users = get_user_model().objects.filter(username='testuser')
|
||||
self.assertEqual(users.count(), 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue