We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6dd57e0 commit ae4cb45Copy full SHA for ae4cb45
dojo/urls.py
@@ -1,5 +1,6 @@
1
from django.conf import settings
2
from django.conf.urls import include, url
3
+from django.conf.urls.static import static
4
from django.contrib import admin
5
from tastypie.api import Api
6
@@ -100,8 +101,5 @@
100
101
url(r'^%s' % settings.URL_PREFIX, include(ur)),
102
]
103
-
104
-# if settings.DEBUG:
105
-# urlpatterns += patterns('django.views.static',
106
-# (r'media/(?P<path>.*)', 'serve', {
107
-# 'document_root': settings.MEDIA_ROOT}))
+if settings.DEBUG:
+ urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
0 commit comments