From 01dd16c7954cb8294e0a2a354bc750dca3919e05 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Thu, 30 Jun 2022 11:01:17 +0200 Subject: [PATCH] url -> re_path --- bda/urls.py | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/bda/urls.py b/bda/urls.py index 5b452362..726c4057 100644 --- a/bda/urls.py +++ b/bda/urls.py @@ -1,74 +1,80 @@ -from django.conf.urls import url +from django.urls import re_path from bda import views from bda.views import SpectacleListView from gestioncof.decorators import buro_required urlpatterns = [ - url( + re_path( r"^inscription/(?P\d+)$", views.inscription, name="bda-tirage-inscription", ), - url(r"^places/(?P\d+)$", views.places, name="bda-places-attribuees"), - url(r"^etat-places/(?P\d+)$", views.etat_places, name="bda-etat-places"), - url(r"^tirage/(?P\d+)$", views.tirage, name="bda-tirage"), - url( + re_path(r"^places/(?P\d+)$", views.places, name="bda-places-attribuees"), + re_path( + r"^etat-places/(?P\d+)$", views.etat_places, name="bda-etat-places" + ), + re_path(r"^tirage/(?P\d+)$", views.tirage, name="bda-tirage"), + re_path( r"^spectacles/(?P\d+)$", buro_required(SpectacleListView.as_view()), name="bda-liste-spectacles", ), - url( + re_path( r"^spectacles/(?P\d+)/(?P\d+)$", views.spectacle, name="bda-spectacle", ), - url( + re_path( r"^spectacles/unpaid/(?P\d+)$", views.UnpaidParticipants.as_view(), name="bda-unpaid", ), - url( + re_path( r"^spectacles/autocomplete$", views.spectacle_autocomplete, name="bda-spectacle-autocomplete", ), - url( + re_path( r"^participants/autocomplete$", views.participant_autocomplete, name="bda-participant-autocomplete", ), # Urls BdA-Revente - url( + re_path( r"^revente/(?P\d+)/manage$", views.revente_manage, name="bda-revente-manage", ), - url( + re_path( r"^revente/(?P\d+)/subscribe$", views.revente_subscribe, name="bda-revente-subscribe", ), - url( + re_path( r"^revente/(?P\d+)/tirages$", views.revente_tirages, name="bda-revente-tirages", ), - url( + re_path( r"^revente/(?P\d+)/buy$", views.revente_buy, name="bda-revente-buy", ), - url( + re_path( r"^revente/(?P\d+)/confirm$", views.revente_confirm, name="bda-revente-confirm", ), - url( + re_path( r"^revente/(?P\d+)/shotgun$", views.revente_shotgun, name="bda-revente-shotgun", ), - url(r"^mails-rappel/(?P\d+)$", views.send_rappel, name="bda-rappels"), - url(r"^catalogue/(?P[a-z]+)$", views.catalogue, name="bda-catalogue"), + re_path( + r"^mails-rappel/(?P\d+)$", views.send_rappel, name="bda-rappels" + ), + re_path( + r"^catalogue/(?P[a-z]+)$", views.catalogue, name="bda-catalogue" + ), ]