From 158b1d5c12fd2332960671bce6d71953871da3cf Mon Sep 17 00:00:00 2001 From: Ernesto Rico-Schmidt Date: Sat, 2 Apr 2011 14:32:19 +0200 Subject: added static_media. diff --git a/urls.py b/urls.py index db535ce..5aaf499 100644 --- a/urls.py +++ b/urls.py @@ -1,9 +1,19 @@ +from django.conf import settings from django.conf.urls.defaults import * from django.contrib import admin +import os + admin.autodiscover() urlpatterns = patterns('', (r'^admin/', include(admin.site.urls)), (r'^program/', include('helsinki.program.urls')), ) +if settings.DEBUG: + urlpatterns += patterns('', + (r'^site_media/(?P.*)$', + 'django.views.static.serve', + {'document_root': os.path.join(os.path.dirname(__file__), 'site_media')} + ), + ) -- cgit v0.10.2