summaryrefslogtreecommitdiff
path: root/pv
diff options
context:
space:
mode:
authornnrcschmdt <e.rico.schmidt@gmail.com>2017-06-13 00:32:21 (GMT)
committernnrcschmdt <e.rico.schmidt@gmail.com>2017-06-13 00:32:21 (GMT)
commit3838b4d64823868755d4a08a574b94f39fd06fb4 (patch)
tree9ee26d9331528344e7099b7ec229aae8305f1e1a /pv
parent980f1e3c194dbe7984c214eee5776bf8dfcf4026 (diff)
removed django.conf.urls.patterns
Diffstat (limited to 'pv')
-rw-r--r--pv/urls.py24
1 files changed, 11 insertions, 13 deletions
diff --git a/pv/urls.py b/pv/urls.py
index 9617f8e..f98373f 100644
--- a/pv/urls.py
+++ b/pv/urls.py
@@ -1,22 +1,20 @@
from django.conf import settings
-from django.conf.urls import patterns, url, include
+from django.conf.urls import url, include
from django.contrib import admin
+from django.views.static import serve
from program.views import json_day_schedule, json_timeslots_specials
admin.autodiscover()
-urlpatterns = patterns('',
- url(r'^admin/', include(admin.site.urls)),
- url(r'^program/', include('program.urls')),
- url(r'^nop', include('nop.urls')),
- url(r'^tinymce/', include('tinymce.urls')),
- url(r'^export/day_schedule/(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/$', json_day_schedule),
- url(r'^export/timeslots_specials.json$', json_timeslots_specials)
- )
+urlpatterns = [
+ url(r'^admin/', include(admin.site.urls)),
+ url(r'^program/', include('program.urls')),
+ url(r'^nop', include('nop.urls')),
+ url(r'^tinymce/', include('tinymce.urls')),
+ url(r'^export/day_schedule/(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/$', json_day_schedule),
+ url(r'^export/timeslots_specials.json$', json_timeslots_specials)
+]
if settings.DEBUG:
- urlpatterns += patterns('',
- (r'^site_media/(?P<path>.*)$', 'django.views.static.serve',
- {'document_root': settings.MEDIA_ROOT})
- )
+ urlpatterns.append(url(r'^site_media/(?P<path>.*)$', serve, {'document_root': settings.MEDIA_ROOT}))