deprecated url support

This commit is contained in:
Valentin Moguérou 2024-05-17 01:09:07 +02:00
parent a4f87f4e2d
commit 3554d4fbcc
1 changed files with 6 additions and 0 deletions

View File

@ -1,6 +1,7 @@
from django.urls import path from django.urls import path
from django.shortcuts import redirect from django.shortcuts import redirect
from . import views from . import views
from .views import ColleListView
urlpatterns = [ urlpatterns = [
path("", lambda req: redirect("colloscope:dashboard"), name="home"), path("", lambda req: redirect("colloscope:dashboard"), name="home"),
@ -8,8 +9,13 @@ urlpatterns = [
path("dashboard", views.dashboard, name="dashboard"), path("dashboard", views.dashboard, name="dashboard"),
path("export.pdf", views.export, name="export"), path("export.pdf", views.export, name="export"),
path("export/calendar/<str:key>/calendar.ics", views.icalendar, name="export-ics"), path("export/calendar/<str:key>/calendar.ics", views.icalendar, name="export-ics"),
path("calendrier.ics",
lambda req: redirect("colloscope:export-ics", key=req.GET.get("key")), name="export-ics-old"),
path("select_profile", views.select_profile, name="select_profile"), path("select_profile", views.select_profile, name="select_profile"),
path("marketplace", views.marketplace, name="marketplace"), path("marketplace", views.marketplace, name="marketplace"),
path("action/enroll", views.enroll, name="enroll"), path("action/enroll", views.enroll, name="enroll"),
path("action/withdraw", views.withdraw, name="withdraw"), path("action/withdraw", views.withdraw, name="withdraw"),
path("colles/", ColleListView.as_view(), name="colles"),
path("colles/by_subject/<int:subject>/", ColleListView.as_view(), name="colles_by_subject"),
path("colles/by_colleur/<int:colleur>/", ColleListView.as_view(), name="colles_by_colleur"),
] ]