diff --git a/sith/settings.py b/sith/settings.py index 7c99d27e..2f773bf1 100644 --- a/sith/settings.py +++ b/sith/settings.py @@ -187,6 +187,7 @@ MEDIA_URL = '/data/' # https://docs.djangoproject.com/en/1.8/howto/static-files/ STATIC_URL = '/static/' +STATIC_ROOT = './static/' # Auth configuration diff --git a/sith/urls.py b/sith/urls.py index d8d282d2..c93f36c9 100644 --- a/sith/urls.py +++ b/sith/urls.py @@ -40,5 +40,9 @@ urlpatterns = [ url(r'^ajax_select/', include(ajax_select_urls)), url(r'^i18n/', include('django.conf.urls.i18n')), url(r'^jsi18n/$', javascript_catalog, js_info_dict, name='javascript-catalog'), -] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) # TODO: remove me for production!!! +] + +if settings.DEBUG: + urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)