summaryrefslogtreecommitdiff
path: root/helsinki.program/urls_program.py
diff options
context:
space:
mode:
authorJohannes Raggam <raggam-nl@adm.at>2011-03-26 19:36:39 (GMT)
committerJohannes Raggam <raggam-nl@adm.at>2011-03-26 19:36:39 (GMT)
commit1f384ccf609e4d8cea4ac15c789d044ab6fa86f7 (patch)
treecabede5815519adcce80cfa5aeee239873221b11 /helsinki.program/urls_program.py
parent5504c0d926aabb2017e547bfbfbcf986ce5ee037 (diff)
creating an egg pt2
Diffstat (limited to 'helsinki.program/urls_program.py')
-rw-r--r--helsinki.program/urls_program.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/helsinki.program/urls_program.py b/helsinki.program/urls_program.py
new file mode 100644
index 0000000..637ad97
--- /dev/null
+++ b/helsinki.program/urls_program.py
@@ -0,0 +1,20 @@
+from django.conf.urls.defaults import *
+from django.views.generic.detail import DetailView
+from django.views.generic.list import ListView
+
+from models import Host, Show, TimeSlot
+from views import CurrentShowView, DayScheduleView, RecommendationsView, ShowListView, TodayScheduleView, WeekScheduleView
+
+urlpatterns = patterns('',
+ ('^$', TodayScheduleView.as_view()),
+ ('^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/$', DayScheduleView.as_view()),
+ ('^(?P<year>\d{4})/(?P<week>\d{1,2})/$', WeekScheduleView.as_view()),
+ ('^current_box/$', CurrentShowView.as_view()),
+ ('^hosts/$', ListView.as_view(model=Host, context_object_name='hosts')),
+ url('^host/(?P<pk>\d+)/$', DetailView.as_view(model=Host), name='host-detail'),
+ ('^recommendations/$', RecommendationsView.as_view()),
+ ('^recommendations_box/$', RecommendationsView.as_view(template_name='program/recommendations_box.html')),
+ ('^shows/$', ShowListView.as_view()),
+ url('^show/(?P<slug>[\w-]+)/$', DetailView.as_view(model=Show), name='show-detail'),
+ url('^(?P<pk>\d+)/$', DetailView.as_view(model=TimeSlot), name='timeslot-detail'),
+) \ No newline at end of file