1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-21 18:08:21 +02:00

Serve static files with Nginx only in production to make JavaScript development easier

Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
2021-10-04 13:58:48 +02:00
parent 2a216fd994
commit df3bb71357
6 changed files with 6 additions and 8 deletions

View File

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