* Let django server /static in debug mode.
authorMatthijs Kooijman <matthijs@stdin.nl>
Thu, 24 Jan 2008 11:49:49 +0000 (12:49 +0100)
committerMatthijs Kooijman <matthijs@stdin.nl>
Thu, 24 Jan 2008 11:49:49 +0000 (12:49 +0100)
urls.py

diff --git a/urls.py b/urls.py
index f3f7a1f350cd2665d118e4a2c07dae835d9a27d4..ae9c60fd24dce4c08c730a8416032122298b4873 100644 (file)
--- 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<path>.*)$', 'django.views.static.serve',
+        {'document_root': '/home/matthijs/docs/src/django/ee/static/'}),
+    )