summaryrefslogtreecommitdiff
path: root/helsinki/program
diff options
context:
space:
mode:
authorJohannes Raggam <raggam-nl@adm.at>2011-04-04 20:31:12 (GMT)
committerJohannes Raggam <raggam-nl@adm.at>2011-04-04 20:31:12 (GMT)
commit8c9bb66627a700476c48976d24a6c5944bd5345e (patch)
tree74121be87826140e6d1ab91652fe9f46fbaeffba /helsinki/program
parent9ab0c5c4f92f6f2d41cb1e159413a53a4a3f27bc (diff)
allow urls with and without trailing slash
Diffstat (limited to 'helsinki/program')
-rw-r--r--helsinki/program/urls.py2
-rw-r--r--helsinki/program/urls_program.py22
2 files changed, 12 insertions, 12 deletions
diff --git a/helsinki/program/urls.py b/helsinki/program/urls.py
index 9de7b46..b956ef6 100644
--- a/helsinki/program/urls.py
+++ b/helsinki/program/urls.py
@@ -5,5 +5,5 @@ admin.autodiscover()
urlpatterns = patterns('',
(r'^admin/', include(admin.site.urls)),
- (r'^program/', include('helsinki.program.urls_program')),
+ (r'^program', include('helsinki.program.urls_program')),
)
diff --git a/helsinki/program/urls_program.py b/helsinki/program/urls_program.py
index d96d7d7..913ebe4 100644
--- a/helsinki/program/urls_program.py
+++ b/helsinki/program/urls_program.py
@@ -6,15 +6,15 @@ from helsinki.program.models import Host, Show, TimeSlot
from helsinki.program.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('^hosts/(?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('^shows/(?P<slug>[\w-]+)/$', DetailView.as_view(model=Show), name='show-detail'),
- url('^(?P<pk>\d+)/$', DetailView.as_view(model=TimeSlot), name='timeslot-detail'),
+ ('^/?$', 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('^/hosts/(?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('^/shows/(?P<slug>[\w-]+)/?$', DetailView.as_view(model=Show), name='show-detail'),
+ url('^/(?P<pk>\d+)/?$', DetailView.as_view(model=TimeSlot), name='timeslot-detail'),
)