kopia lustrzana https://github.com/hholzgra/maposmatic/
Only do static serve in debug mode
Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>stable
rodzic
cee6b17f18
commit
566412ea79
15
www/urls.py
15
www/urls.py
|
|
@ -72,10 +72,13 @@ urlpatterns = patterns('',
|
|||
# Feeds
|
||||
(r'^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.feed',
|
||||
{'feed_dict': feeds}),
|
||||
|
||||
# Static data
|
||||
(r'^results/(?P<path>.*)$', 'django.views.static.serve',
|
||||
{'document_root': '/tmp/foo/'}),
|
||||
(r'^smedia/(?P<path>.*)$', 'django.views.static.serve',
|
||||
{'document_root': settings.LOCAL_MEDIA_PATH}),
|
||||
)
|
||||
|
||||
if settings.DEBUG:
|
||||
urlpatterns.extend(patterns('',
|
||||
(r'^results/(?P<path>.*)$', 'django.views.static.serve',
|
||||
{'document_root': settings.RENDERING_RESULT_PATH}),
|
||||
|
||||
(r'^smedia/(?P<path>.*)$', 'django.views.static.serve',
|
||||
{'document_root': settings.LOCAL_MEDIA_PATH}),
|
||||
))
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue