2014-08-12 14:54:42 +00:00
|
|
|
from django.contrib.auth import views as auth_views
|
2018-12-07 22:52:28 +00:00
|
|
|
from django.urls import path
|
2011-04-02 08:45:38 +00:00
|
|
|
from django.views.generic import RedirectView
|
2011-10-13 18:04:12 +00:00
|
|
|
|
|
|
|
from . import views
|
|
|
|
|
2014-04-02 00:46:34 +00:00
|
|
|
urlpatterns = [
|
2022-02-03 19:24:19 +00:00
|
|
|
path("upload_view/", views.upload_view, name="upload_view"),
|
|
|
|
path("get_view/", views.get_view, name="get_view"),
|
2022-06-16 16:04:13 +00:00
|
|
|
path("cbv_view/", views.CBView.as_view()),
|
2022-02-03 19:24:19 +00:00
|
|
|
path("post_view/", views.post_view),
|
|
|
|
path("post_then_get_view/", views.post_then_get_view),
|
|
|
|
path("put_view/", views.put_view),
|
|
|
|
path("trace_view/", views.trace_view),
|
|
|
|
path("header_view/", views.view_with_header),
|
|
|
|
path("raw_post_view/", views.raw_post_view),
|
|
|
|
path("redirect_view/", views.redirect_view),
|
|
|
|
path("redirect_view_307/", views.method_saving_307_redirect_view),
|
|
|
|
path(
|
|
|
|
"redirect_view_307_query_string/",
|
2020-05-27 07:16:01 +00:00
|
|
|
views.method_saving_307_redirect_query_string_view,
|
|
|
|
),
|
2022-02-03 19:24:19 +00:00
|
|
|
path("redirect_view_308/", views.method_saving_308_redirect_view),
|
2020-05-27 07:16:01 +00:00
|
|
|
path(
|
2022-02-03 19:24:19 +00:00
|
|
|
"redirect_view_308_query_string/",
|
2020-05-27 07:16:01 +00:00
|
|
|
views.method_saving_308_redirect_query_string_view,
|
|
|
|
),
|
2023-10-27 13:23:07 +00:00
|
|
|
path(
|
|
|
|
"redirect_to_different_hostname/",
|
|
|
|
views.redirect_to_different_hostname,
|
|
|
|
name="redirect_to_different_hostname",
|
|
|
|
),
|
|
|
|
path("get_host_view/", views.get_host_view, name="get_host_view"),
|
2022-02-03 19:24:19 +00:00
|
|
|
path("secure_view/", views.view_with_secure),
|
|
|
|
path(
|
|
|
|
"permanent_redirect_view/",
|
|
|
|
RedirectView.as_view(url="/get_view/", permanent=True),
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
"temporary_redirect_view/",
|
|
|
|
RedirectView.as_view(url="/get_view/", permanent=False),
|
|
|
|
),
|
|
|
|
path("http_redirect_view/", RedirectView.as_view(url="/secure_view/")),
|
|
|
|
path(
|
|
|
|
"https_redirect_view/",
|
|
|
|
RedirectView.as_view(url="https://testserver/secure_view/"),
|
|
|
|
),
|
|
|
|
path("double_redirect_view/", views.double_redirect_view),
|
|
|
|
path("bad_view/", views.bad_view),
|
|
|
|
path("form_view/", views.form_view),
|
|
|
|
path("form_view_with_template/", views.form_view_with_template),
|
|
|
|
path("json_view/", views.json_view),
|
|
|
|
path("login_protected_view/", views.login_protected_view),
|
|
|
|
path("login_protected_method_view/", views.login_protected_method_view),
|
|
|
|
path(
|
|
|
|
"login_protected_view_custom_redirect/",
|
|
|
|
views.login_protected_view_changed_redirect,
|
|
|
|
),
|
|
|
|
path("permission_protected_view/", views.permission_protected_view),
|
|
|
|
path(
|
|
|
|
"permission_protected_view_exception/",
|
|
|
|
views.permission_protected_view_exception,
|
|
|
|
),
|
|
|
|
path("permission_protected_method_view/", views.permission_protected_method_view),
|
|
|
|
path("session_view/", views.session_view),
|
|
|
|
path("broken_view/", views.broken_view),
|
|
|
|
path("mail_sending_view/", views.mail_sending_view),
|
|
|
|
path("mass_mail_sending_view/", views.mass_mail_sending_view),
|
|
|
|
path("nesting_exception_view/", views.nesting_exception_view),
|
|
|
|
path("django_project_redirect/", views.django_project_redirect),
|
|
|
|
path(
|
|
|
|
"no_trailing_slash_external_redirect/",
|
|
|
|
views.no_trailing_slash_external_redirect,
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
"", views.index_view, name="index"
|
|
|
|
), # Target for no_trailing_slash_external_redirect/ with follow=True
|
|
|
|
path("two_arg_exception/", views.two_arg_exception),
|
|
|
|
path("accounts/", RedirectView.as_view(url="login/")),
|
|
|
|
path("accounts/no_trailing_slash", RedirectView.as_view(url="login/")),
|
|
|
|
path("accounts/login/", auth_views.LoginView.as_view(template_name="login.html")),
|
|
|
|
path("accounts/logout/", auth_views.LogoutView.as_view()),
|
2020-02-12 22:15:00 +00:00
|
|
|
# Async views.
|
2022-02-03 19:24:19 +00:00
|
|
|
path("async_get_view/", views.async_get_view, name="async_get_view"),
|
2014-04-02 00:46:34 +00:00
|
|
|
]
|