mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-20 21:11:55 +00:00
Fixed issue with 'django.contrib.auth.views.login' not being reversed properly
This commit is contained in:
parent
b35f6d9409
commit
45a10979c6
2 changed files with 7 additions and 1 deletions
|
|
@ -92,7 +92,6 @@ class TestAuthentication(TestCase, WagtailTestUtils):
|
|||
self.assertEqual(response.status_code, 302)
|
||||
self.assertURLEqual(response.url, reverse('wagtailadmin_login') + '?next=' + reverse('wagtailadmin_home'))
|
||||
|
||||
@unittest.expectedFailure
|
||||
def test_not_logged_in_redirect_default_settings(self):
|
||||
"""
|
||||
This does the same as the above test but checks that it
|
||||
|
|
|
|||
|
|
@ -84,6 +84,13 @@ urlpatterns += [
|
|||
]
|
||||
|
||||
|
||||
# This is here to make sure that 'django.contrib.auth.views.login' is reversed correctly
|
||||
# It must be placed after 'wagtailadmin_login' to prevent this from being used
|
||||
urlpatterns += [
|
||||
url(r'^login/$', 'django.contrib.auth.views.login'),
|
||||
]
|
||||
|
||||
|
||||
# Import additional urlpatterns from any apps that define a register_admin_urls hook
|
||||
for fn in hooks.get_hooks('register_admin_urls'):
|
||||
urls = fn()
|
||||
|
|
|
|||
Loading…
Reference in a new issue