1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2024-12-22 23:42:25 +00:00

Do not serve static files outside of debug server

This commit is contained in:
Alexandre Iooss 2020-09-09 17:14:03 +02:00
parent c720e5483e
commit 0f1f3b9560

View File

@ -36,8 +36,9 @@ urlpatterns = [
path('coffee/', include('django_htcpcp_tea.urls')),
]
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
# During development, serve media files
if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
if "cas_server" in settings.INSTALLED_APPS: