Browse Source

pyi2phosts/urls.py: allow django to serve static files when debug enabled

pull/1/head
Hidden Z 14 years ago
parent
commit
2e5ba8d88d
  1. 4
      pyi2phosts/urls.py

4
pyi2phosts/urls.py

@ -20,3 +20,7 @@ urlpatterns = patterns('', @@ -20,3 +20,7 @@ urlpatterns = patterns('',
# Uncomment the next line to enable the admin:
(r'^admin/', include(admin.site.urls)),
)
if settings.DEBUG:
urlpatterns += patterns('', (r'static/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT, 'show_indexes':True}))

Loading…
Cancel
Save