1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-01 07:01:12 +00:00

Disable DEBUG, and let Django serve static file by default.

This commit is contained in:
zhengxie
2012-12-03 21:47:27 +08:00
parent 1fa3724e31
commit 127cb79aa5
2 changed files with 7 additions and 3 deletions

View File

@@ -94,7 +94,7 @@ urlpatterns = patterns('',
url(r'^sys/groupadmin/$', sys_group_admin, name='sys_group_admin'),
)
if settings.DEBUG:
if settings.SERVE_STATIC:
media_url = settings.MEDIA_URL.strip('/')
urlpatterns += patterns('',
(r'^%s/(?P<path>.*)$' % (media_url), 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),