summaryrefslogtreecommitdiff
path: root/tests/test_client_regress
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2014-11-27 05:44:56 +0200
committerTim Graham <timograham@gmail.com>2014-11-28 17:59:55 -0500
commit47789410dbf351fd17a7854492b7b5b99a66bb1c (patch)
treee5137247428936d0c460f31b1ab7b3fa15a147cf /tests/test_client_regress
parent9253042d53d61b23b3f727a00c41e8089be73836 (diff)
downloaddjango-47789410dbf351fd17a7854492b7b5b99a66bb1c.tar.gz
Corrected deprecation warnings for RedirectView; refs #21587.
Diffstat (limited to 'tests/test_client_regress')
-rw-r--r--tests/test_client_regress/urls.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/test_client_regress/urls.py b/tests/test_client_regress/urls.py
index a69a774555..8914c82902 100644
--- a/tests/test_client_regress/urls.py
+++ b/tests/test_client_regress/urls.py
@@ -3,7 +3,7 @@ from django.views.generic import RedirectView
from . import views
-
+# TODO: Remove permanent=True where it doesn't matter in Django 1.9
urlpatterns = [
url(r'', include('test_client.urls')),
@@ -15,17 +15,17 @@ urlpatterns = [
url(r'^arg_view/(?P<name>.+)/$', views.view_with_argument, name='arg_view'),
url(r'^nested_view/$', views.nested_view, name='nested_view'),
url(r'^login_protected_redirect_view/$', views.login_protected_redirect_view),
- url(r'^redirects/$', RedirectView.as_view(url='/redirects/further/')),
- url(r'^redirects/further/$', RedirectView.as_view(url='/redirects/further/more/')),
- url(r'^redirects/further/more/$', RedirectView.as_view(url='/no_template_view/')),
- url(r'^redirect_to_non_existent_view/$', RedirectView.as_view(url='/non_existent_view/')),
- url(r'^redirect_to_non_existent_view2/$', RedirectView.as_view(url='/redirect_to_non_existent_view/')),
- url(r'^redirect_to_self/$', RedirectView.as_view(url='/redirect_to_self/')),
+ url(r'^redirects/$', RedirectView.as_view(url='/redirects/further/', permanent=True)),
+ url(r'^redirects/further/$', RedirectView.as_view(url='/redirects/further/more/', permanent=True)),
+ url(r'^redirects/further/more/$', RedirectView.as_view(url='/no_template_view/', permanent=True)),
+ url(r'^redirect_to_non_existent_view/$', RedirectView.as_view(url='/non_existent_view/', permanent=True)),
+ url(r'^redirect_to_non_existent_view2/$', RedirectView.as_view(url='/redirect_to_non_existent_view/', permanent=True)),
+ url(r'^redirect_to_self/$', RedirectView.as_view(url='/redirect_to_self/', permanent=True)),
url(r'^redirect_to_self_with_changing_query_view/$', views.redirect_to_self_with_changing_query_view),
- url(r'^circular_redirect_1/$', RedirectView.as_view(url='/circular_redirect_2/')),
- url(r'^circular_redirect_2/$', RedirectView.as_view(url='/circular_redirect_3/')),
- url(r'^circular_redirect_3/$', RedirectView.as_view(url='/circular_redirect_1/')),
- url(r'^redirect_other_host/$', RedirectView.as_view(url='https://otherserver:8443/no_template_view/')),
+ url(r'^circular_redirect_1/$', RedirectView.as_view(url='/circular_redirect_2/', permanent=True)),
+ url(r'^circular_redirect_2/$', RedirectView.as_view(url='/circular_redirect_3/', permanent=True)),
+ url(r'^circular_redirect_3/$', RedirectView.as_view(url='/circular_redirect_1/', permanent=True)),
+ url(r'^redirect_other_host/$', RedirectView.as_view(url='https://otherserver:8443/no_template_view/', permanent=True)),
url(r'^set_session/$', views.set_session_view),
url(r'^check_session/$', views.check_session_view),
url(r'^request_methods/$', views.request_methods_view),
@@ -33,7 +33,7 @@ urlpatterns = [
url(r'^check_binary/$', views.return_undecodable_binary),
url(r'^parse_unicode_json/$', views.return_json_file),
url(r'^check_headers/$', views.check_headers),
- url(r'^check_headers_redirect/$', RedirectView.as_view(url='/check_headers/')),
+ url(r'^check_headers_redirect/$', RedirectView.as_view(url='/check_headers/', permanent=True)),
url(r'^body/$', views.body),
url(r'^read_all/$', views.read_all),
url(r'^read_buffer/$', views.read_buffer),