-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathurls.py
22 lines (17 loc) · 1.06 KB
/
urls.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from django.urls import include, path, re_path
from onisite.plugins.calendar import views
urlpatterns = [
# Override core's /issues, which is the calendar for the first year that
# has any content ingested
re_path(r'^issues/$', views.all_issues_calendar, name="calendar_all_issues_calendar"),
# Override core's calendar for a user-specified year
re_path(r'^issues/(?P<year>\d{4})$', views.all_issues_calendar, name="calendar_all_issues_calendar_for_year"),
# Override core's title-specific calendar for the first year available
re_path(r'^lccn/(?P<lccn>\w+)/issues/$', views.title_issues_calendar, name="calendar_title_issues_calendar"),
# Override core's title-specific calendar for a user-specified year
re_path(r'^lccn/(?P<lccn>\w+)/issues/(?P<year>\d{4})$',
views.title_issues_calendar, name="calendar_title_issues_calendar_for_year"),
# New handler: issue list for a given date
re_path(r'^issues/(?P<lccn>\w+)/(?P<year>\d{4})-(?P<month>\d{2})-(?P<day>\d{2})/$',
views.issues_for_date, name="calendar_issues_for_date"),
]