From: Matthijs Kooijman Date: Thu, 24 Jan 2008 11:49:49 +0000 (+0100) Subject: * Let django server /static in debug mode. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=e3ea448b4125bc00c3e585144f9b3eded659771e;p=matthijs%2Fprojects%2Fxerxes.git * Let django server /static in debug mode. --- diff --git a/urls.py b/urls.py index f3f7a1f..ae9c60f 100644 --- a/urls.py +++ b/urls.py @@ -1,3 +1,4 @@ +from django.conf import settings from django.conf.urls.defaults import * from ee.influences.models import Character @@ -17,3 +18,9 @@ urlpatterns = patterns('', (r'^accounts/login/$', 'django.contrib.auth.views.login', {'template_name': 'base/login.html'}), (r'^accounts/logout/$', 'django.contrib.auth.views.logout_then_login'), ) + +if settings.DEBUG: + urlpatterns += patterns('', + (r'^static/(?P.*)$', 'django.views.static.serve', + {'document_root': '/home/matthijs/docs/src/django/ee/static/'}), + )