From 70c81b22ecf45d5578acf88e09a7681836b78979 Mon Sep 17 00:00:00 2001 From: Arnaud-D <35631001+Arnaud-D@users.noreply.github.com> Date: Sat, 7 May 2022 09:45:05 +0200 Subject: [PATCH] Refactorise les URL de 'pages' --- zds/pages/urls.py | 24 ++++++++++++------------ zds/urls.py | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/zds/pages/urls.py b/zds/pages/urls.py index e4163aef3d..6a80245ff1 100644 --- a/zds/pages/urls.py +++ b/zds/pages/urls.py @@ -1,4 +1,4 @@ -from django.urls import re_path +from django.urls import path from zds.pages.views import ( about, @@ -16,16 +16,16 @@ urlpatterns = [ # single pages - re_path(r"^apropos/$", about, name="pages-about"), - re_path(r"^association/$", association, name="pages-association"), - re_path(r"^contact/$", ContactView.as_view(), name="pages-contact"), - re_path(r"^cgu/$", eula, name="pages-eula"), - re_path(r"^alertes/$", alerts, name="pages-alerts"), - re_path(r"^cookies/$", cookies, name="pages-cookies"), - re_path(r"^historique-editions/(?P\d+)/$", CommentEditsHistory.as_view(), name="comment-edits-history"), - re_path(r"^contenu-original/(?P\d+)/$", EditDetail.as_view(), name="edit-detail"), - re_path(r"^restaurer-edition/(?P\d+)/$", restore_edit, name="restore-edit"), - re_path(r"^supprimer-contenu-edition/(?P\d+)/$", delete_edit_content, name="delete-edit-content"), + path("apropos/", about, name="pages-about"), + path("association/", association, name="pages-association"), + path("contact/", ContactView.as_view(), name="pages-contact"), + path("cgu/", eula, name="pages-eula"), + path("alertes/", alerts, name="pages-alerts"), + path("cookies/", cookies, name="pages-cookies"), + path("historique-editions//", CommentEditsHistory.as_view(), name="comment-edits-history"), + path("contenu-original//", EditDetail.as_view(), name="edit-detail"), + path("restaurer-edition//", restore_edit, name="restore-edit"), + path("supprimer-contenu-edition//", delete_edit_content, name="delete-edit-content"), # index - re_path(r"^$", index, name="pages-index"), + path("", index, name="pages-index"), ] diff --git a/zds/urls.py b/zds/urls.py index 64ada6e5e9..8cfc602cd0 100644 --- a/zds/urls.py +++ b/zds/urls.py @@ -87,7 +87,7 @@ def location(self, item): re_path(r"^mp/", include(("zds.mp.urls", ""))), re_path(r"^membres/", include(("zds.member.urls", ""))), re_path(r"^admin/", admin.site.urls), - re_path(r"^pages/", include(("zds.pages.urls", ""))), + path("pages/", include("zds.pages.urls")), re_path(r"^galerie/", include(("zds.gallery.urls", ""))), re_path(r"^rechercher/", include(("zds.searchv2.urls", "zds.searchv2"), namespace="search")), re_path(r"^munin/", include(("zds.munin.urls", ""))),