summaryrefslogtreecommitdiff
path: root/program/urls.py
blob: 776b9c0ced1b2c53d524fdb3c6a0dcf0fb48a6fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from django.conf import settings
from django.conf.urls import patterns, url
from django.views.decorators.cache import cache_page

import views

import os

PROGRAM_SITE_MEDIA = os.path.join(os.path.dirname(__file__), '../site_media')

urlpatterns = patterns('',
                       url(r'^today/?$', views.DayScheduleView.as_view()),
                       url(r'^week/?$', views.WeekScheduleView.as_view()),
                       url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/?$', views.DayScheduleView.as_view()),
                       url(r'^(?P<year>\d{4})/(?P<week>\d{1,2})/?$', views.WeekScheduleView.as_view()),
                       url(r'^current_box/?$', cache_page(60)(views.CurrentShowBoxView.as_view())),
                       url(r'^hosts/?$', views.HostListView.as_view()),
                       url(r'^hosts/(?P<pk>\d+)/?$', views.HostDetailView.as_view(), name='host-detail'),
                       url(r'^tips/?$', views.RecommendationsListView.as_view()),
                       url(r'^tips_box/?$', views.RecommendationsBoxView.as_view()),
                       url(r'^shows/?$', views.ShowListView.as_view()),
                       url(r'^shows/(?P<slug>[\w-]+)/?$', views.ShowDetailView.as_view(), name='show-detail'),
                       url(r'^(?P<pk>\d+)/?$', views.TimeSlotDetailView.as_view(), name='timeslot-detail'),
                       url(r'^styles.css$', views.StylesView.as_view()),
                       # V2 Patterns for new Homepage 2021
                       url(r'^v2/today/?$', views.DayScheduleViewV2.as_view()),
                       url(r'^v2/(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/?$', views.DayScheduleViewV2.as_view()),
                       url(r'^v2/hosts/?$', views.HostListViewV2.as_view()),
                       url(r'^v2/hosts/(?P<pk>\d+)/?$', views.HostDetailViewV2.as_view()),
                       url(r'^v2/tips/?$', views.RecommendationsListViewV2.as_view()),
                       url(r'^v2/shows/?$', views.ShowListViewV2.as_view()),
                       url(r'^v2/shows/(?P<slug>[\w-]+)/?$', views.ShowDetailViewV2.as_view()),
                       url(r'^v2/(?P<pk>\d+)/?$', views.TimeSlotDetailViewV2.as_view()),
                       url(r'^v2/show-filters/?$', views.ShowFilterListViewV2.as_view()),
                       )
if settings.DEBUG:
    urlpatterns += \
        patterns('',
                 url(r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': PROGRAM_SITE_MEDIA}))