From: Fam Zheng <fam@euphon.net>
To prepare to upgrade to django 3.
---
www/urls.py | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/www/urls.py b/www/urls.py
index c3de7ce..e90fd90 100644
--- a/www/urls.py
+++ b/www/urls.py
@@ -17,10 +17,17 @@ urlpatterns = []
dispatch_module_hook("www_url_hook", urlpatterns=urlpatterns)
urlpatterns += [
- url("^login/$", auth_views.login, {"template_name": "login.html"}, name="login"),
- url("^logout/$", auth_views.logout, name="logout"),
- url("^change-password/$", auth_views.password_change, {"template_name": "password-change.html"}, name="password_change"),
- url("^change-password/done/$", auth_views.password_change_done, {"template_name": "password-change-done.html"}, name="password_change_done"),
+ url("^login/$",
+ auth_views.LoginView.as_view(template_name="login.html"),
+ name="login"),
+ url("^logout/$",
+ auth_views.LogoutView.as_view(), name="logout"),
+ url("^change-password/$",
+ auth_views.PasswordChangeView.as_view(template_name="password-change.html"),
+ name="password_change"),
+ url("^change-password/done/$",
+ auth_views.PasswordChangeDoneView.as_view(template_name="password-change-done.html"),
+ name="password_change_done"),
url(r"^search$", views.view_search, name="search"),
url(r"^search-help$", views.view_search_help, name="search_help"),
url(r"^(?P<project>[^/]*)/$", views.view_series_list, name="series_list"),
--
2.25.1
_______________________________________________
Patchew-devel mailing list
Patchew-devel@redhat.com
https://www.redhat.com/mailman/listinfo/patchew-devel