aboutsummaryrefslogtreecommitdiffstats
path: root/bn_django
diff options
context:
space:
mode:
authorbnewbold <bnewbold@ziggy.(none)>2009-10-05 21:20:21 -0400
committerbnewbold <bnewbold@ziggy.(none)>2009-10-05 21:20:21 -0400
commitb2d9c801f804c2964efeba952b9ac7389971906c (patch)
tree1f03357e4638bf357dc94ac606a5a7a8b394868d /bn_django
parent6381a1c3d3a0622628d6dd58885775e9bf7521cc (diff)
downloadbnewnet-b2d9c801f804c2964efeba952b9ac7389971906c.tar.gz
bnewnet-b2d9c801f804c2964efeba952b9ac7389971906c.zip
serve up static media when developing
Diffstat (limited to 'bn_django')
-rw-r--r--bn_django/urls.py.example6
1 files changed, 6 insertions, 0 deletions
diff --git a/bn_django/urls.py.example b/bn_django/urls.py.example
index c175624..dbb5f6f 100644
--- a/bn_django/urls.py.example
+++ b/bn_django/urls.py.example
@@ -1,3 +1,4 @@
+from django.conf import settings
from django.conf.urls.defaults import *
from photos.models import Photo
from django.contrib.comments.models import Comment
@@ -54,3 +55,8 @@ urlpatterns = patterns('',
#(r'^media/(?P<path>.*)$', 'django.views.static.serve',
# {'document_root': '/home/bnewbold/code/bn-project/media'}),
)
+
+if settings.DEBUG:
+ urlpatterns += patterns('',
+ (r'^static/(?P<path>.*)$', 'django.views.static.serve',
+ {'document_root': '/path/to/media'}), )