src/hdalab/urls.py
changeset 675 d68e7b3a2e4f
parent 607 17f3582ecdb1
--- a/src/hdalab/urls.py	Mon Apr 04 17:04:14 2016 +0200
+++ b/src/hdalab/urls.py	Thu Mar 31 14:13:00 2016 +0200
@@ -3,6 +3,7 @@
 from django.contrib.admin.views.decorators import staff_member_required
 from django.contrib.auth.decorators import login_required
 from django.views.generic import TemplateView
+from django.conf import settings
 
 from hdalab.views import server_error
 from hdalab.views.editorial import HdalabFolders, HdalabAddOrUpdateFolder, \
@@ -80,3 +81,9 @@
     (r'^a/cattree$', 'cattree', {}, 'cat_tree'),
     (r'^a/filltree$', 'filltree', {}, 'fill_tree'),
 )
+
+if settings.DEBUG:
+    # static files (images, css, javascript, etc.)
+    urlpatterns += patterns('',
+        (r'^static/media/(?P<path>.*)$', 'django.views.static.serve', {
+        'document_root': settings.MEDIA_ROOT}))