aboutsummaryrefslogtreecommitdiff
path: root/urls.py
diff options
context:
space:
mode:
authorAlban Gruin2018-04-23 16:20:38 +0200
committerAlban Gruin2018-04-23 16:20:38 +0200
commit63ceb7ff232cd4015ae148bec31c6d72d9239c19 (patch)
tree9aee056480b5fae0c97f5e1c8be4ab1358602926 /urls.py
parentaf055dbf703af0eca03862194de1a0f34ac1fcc5 (diff)
parent9853d375d9e482c23f5fdbed9a3cf041029a92cb (diff)
Merge branch 'qsjps' into futur
Diffstat (limited to 'urls.py')
-rw-r--r--urls.py33
1 files changed, 20 insertions, 13 deletions
diff --git a/urls.py b/urls.py
index 487994e..977ac8d 100644
--- a/urls.py
+++ b/urls.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2017 Alban Gruin
+# Copyright (C) 2017-2018 Alban Gruin
#
# celcatsanitizer is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
@@ -13,19 +13,26 @@
# You should have received a copy of the GNU Affero General Public License
# along with celcatsanitizer. If not, see <http://www.gnu.org/licenses/>.
-from django.conf.urls import include, url
+from django.urls import include, path
from . import feeds, views
urlpatterns = [
- url(r"^$", views.index, name="index"),
- url(r"^pages/", include("django.contrib.flatpages.urls")),
- url(r"^(?P<year_slug>[-\w]+)/$", views.mention_list, name="mentions"),
- url(r"^(?P<year_slug>[-\w]+)/(?P<timetable_slug>[-\w]+)/$", views.group_list, name="groups"),
- url(r"^(?P<year_slug>[-\w]+)/(?P<timetable_slug>[-\w]+)/(?P<group_slug>[-\w]+)/$", views.timetable, name="timetable"),
- url(r"^(?P<year_slug>[-\w]+)/(?P<timetable_slug>[-\w]+)/(?P<group_slug>[-\w]+)/calendars", views.calendars, name="calendars"),
- url(r"^(?P<year_slug>[-\w]+)/(?P<timetable_slug>[-\w]+)/(?P<group_slug>[-\w]+)/calendar.ics$", feeds.IcalFeed(), name="ics"),
- url(r"^(?P<year_slug>[-\w]+)/(?P<timetable_slug>[-\w]+)/(?P<group_slug>[-\w]+)/calendar-group.ics$", feeds.IcalOnlyOneFeed(), name="ics-group"),
- url(r"^(?P<year_slug>[-\w]+)/(?P<timetable_slug>[-\w]+)/(?P<group_slug>[-\w]+)/feed.atom$", feeds.AtomFeed(), name="atom"),
- url(r"^(?P<year_slug>[-\w]+)/(?P<timetable_slug>[-\w]+)/(?P<group_slug>[-\w]+)/feed.rss$", feeds.RSSFeed(), name="rss"),
- url(r"^(?P<year_slug>[-\w]+)/(?P<timetable_slug>[-\w]+)/(?P<group_slug>[-\w]+)/(?P<year>[0-9]{4})/(?P<week>[0-4]?[0-9]|5[0-3])/$", views.timetable, name="timetable"),
+ path("", views.index, name="index"),
+ path("pages/", include("django.contrib.flatpages.urls")),
+ path("salles/", views.rooms, name="rooms"),
+ path("salles/qsjps", views.qsjps, name="qsjps"),
+ path("salles/<slug:room_slug>/", views.room_timetable, name="room-timetable"),
+ path("salles/<slug:room_slug>/semaines", views.room_weeks, name="room-weeks"),
+ path("salles/<slug:room_slug>/<int:year>/<int:week>", views.room_timetable, name="room-timetable"),
+ path("<slug:year_slug>/", views.mention_list, name="mentions"),
+ path("<slug:year_slug>/<slug:timetable_slug>/", views.group_list, name="groups"),
+ path("<slug:year_slug>/<slug:timetable_slug>/tous", views.groups_all, name="groups-all"),
+ path("<slug:year_slug>/<slug:timetable_slug>/<slug:group_slug>/", views.timetable, name="timetable"),
+ path("<slug:year_slug>/<slug:timetable_slug>/<slug:group_slug>/calendars", views.calendars, name="calendars"),
+ path("<slug:year_slug>/<slug:timetable_slug>/<slug:group_slug>/calendar.ics", feeds.IcalFeed(), name="ics"),
+ path("<slug:year_slug>/<slug:timetable_slug>/<slug:group_slug>/calendar-group.ics", feeds.IcalOnlyOneFeed(), name="ics-group"),
+ path("<slug:year_slug>/<slug:timetable_slug>/<slug:group_slug>/feed.atom", feeds.AtomFeed(), name="atom"),
+ path("<slug:year_slug>/<slug:timetable_slug>/<slug:group_slug>/feed.rss", feeds.RSSFeed(), name="rss"),
+ path("<slug:year_slug>/<slug:timetable_slug>/<slug:group_slug>/semaines", views.group_weeks, name="group-weeks"),
+ path("<slug:year_slug>/<slug:timetable_slug>/<slug:group_slug>/<int:year>/<int:week>/", views.timetable, name="timetable"),
]