summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorJohannes Raggam <raggam-nl@adm.at>2011-07-17 15:03:43 (GMT)
committerJohannes Raggam <raggam-nl@adm.at>2011-07-17 15:03:43 (GMT)
commit2b11768e1b5a434843ee40c5a81af7016edca823 (patch)
treee1dfbbfaad2c687425e7e69bae821cc5bb9deff8 /program
parent9e957da85768445421941b57554a9d90260393d0 (diff)
use django/static in debug mode
Diffstat (limited to 'program')
-rw-r--r--program/urls.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/program/urls.py b/program/urls.py
index 7176382..0f643d7 100644
--- a/program/urls.py
+++ b/program/urls.py
@@ -1,3 +1,4 @@
+from django.conf import settings
from django.conf.urls.defaults import *
from django.views.generic.list_detail import object_detail, object_list
@@ -33,3 +34,10 @@ urlpatterns = patterns('',
url(r'^(?P<object_id>\d+)/?$', object_detail, timeslots_dict, name='timeslot-detail'),
url(r'^week/?$', week_schedule),
)
+
+if settings.DEBUG:
+ import os
+ PROGRAM_STATIC_DIR = os.path.join(os.path.dirname(__file__), '../site_media')
+ urlpatterns += patterns('',
+ url(r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': PROGRAM_STATIC_DIR}),
+ )