mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-18 04:01:11 +00:00
Typos for #3310.
This commit is contained in:
parent
72a935a8f0
commit
15daeb80d2
2 changed files with 4 additions and 5 deletions
|
|
@ -2,9 +2,8 @@ from __future__ import absolute_import, unicode_literals
|
|||
|
||||
from django.contrib.auth.views import redirect_to_login as auth_redirect_to_login
|
||||
from django.core.urlresolvers import reverse
|
||||
|
||||
from django.utils.translation import activate as activate_lang
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import activate
|
||||
|
||||
from wagtail.utils.compat import user_is_anonymous
|
||||
from wagtail.wagtailadmin import messages
|
||||
|
|
@ -24,7 +23,7 @@ def require_admin_access(view_func):
|
|||
|
||||
if user.has_perms(['wagtailadmin.access_admin']):
|
||||
if hasattr(user, 'wagtail_userprofile'):
|
||||
activate(user.wagtail_userprofile.get_preferred_language())
|
||||
activate_lang(user.wagtail_userprofile.get_preferred_language())
|
||||
return view_func(request, *args, **kwargs)
|
||||
|
||||
messages.error(request, _('You do not have permission to access the admin'))
|
||||
|
|
|
|||
|
|
@ -293,8 +293,8 @@ class TestAccountSection(TestCase, WagtailTestUtils):
|
|||
|
||||
def test_language_preferences_view_post(self):
|
||||
"""
|
||||
This post to the language preferences view and checks that the
|
||||
user's profile is updated
|
||||
This posts to the language preferences view and checks that the
|
||||
user profile is updated
|
||||
"""
|
||||
# Post new values to the language preferences page
|
||||
post_data = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue