summaryrefslogtreecommitdiff
path: root/tests/auth_tests/urls.py
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2016-07-26 16:10:08 -0700
committerJon Dufresne <jon.dufresne@gmail.com>2016-09-07 19:56:25 -0700
commit66e1ebbffc2742deb9b2051c6de89c0ac58fcc89 (patch)
tree2154180554d1c9ebdf4ddc6b6443f02b9c052173 /tests/auth_tests/urls.py
parentf227b8d15d9d0e0c50eb6459cf4556bccc3fae53 (diff)
Fixed #26956 -- Added success_url_allowed_hosts to LoginView and LogoutView.
Allows specifying additional hosts to redirect after login and log out.
Diffstat (limited to 'tests/auth_tests/urls.py')
-rw-r--r--tests/auth_tests/urls.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auth_tests/urls.py b/tests/auth_tests/urls.py
index e8174fb536..35bdbbb3a8 100644
--- a/tests/auth_tests/urls.py
+++ b/tests/auth_tests/urls.py
@@ -67,6 +67,7 @@ urlpatterns = auth_urlpatterns + [
url(r'^logout/custom_query/$', views.LogoutView.as_view(redirect_field_name='follow')),
url(r'^logout/next_page/$', views.LogoutView.as_view(next_page='/somewhere/')),
url(r'^logout/next_page/named/$', views.LogoutView.as_view(next_page='password_reset')),
+ url(r'^logout/allowed_hosts/$', views.LogoutView.as_view(success_url_allowed_hosts={'otherserver'})),
url(r'^remote_user/$', remote_user_auth_view),
url(r'^password_reset_from_email/$',
@@ -106,6 +107,8 @@ urlpatterns = auth_urlpatterns + [
url(r'^login/redirect_authenticated_user_default/$', views.LoginView.as_view()),
url(r'^login/redirect_authenticated_user/$',
views.LoginView.as_view(redirect_authenticated_user=True)),
+ url(r'^login/allowed_hosts/$',
+ views.LoginView.as_view(success_url_allowed_hosts={'otherserver'})),
# This line is only required to render the password reset with is_admin=True
url(r'^admin/', admin.site.urls),