From 2b11768e1b5a434843ee40c5a81af7016edca823 Mon Sep 17 00:00:00 2001 From: Johannes Raggam Date: Sun, 17 Jul 2011 17:03:43 +0200 Subject: use django/static in debug mode 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\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.*)$', 'django.views.static.serve', {'document_root': PROGRAM_STATIC_DIR}), + ) -- cgit v0.10.2