From e868334eb9de7edf77004196a5fda37adf9ee15f Mon Sep 17 00:00:00 2001 From: Pierre Romera Date: Thu, 18 Jan 2024 16:14:35 +0100 Subject: [PATCH] refactor: inable static endpoint only with FS media storage --- prophecies/urls.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/prophecies/urls.py b/prophecies/urls.py index 95eb81a3..0a199403 100644 --- a/prophecies/urls.py +++ b/prophecies/urls.py @@ -30,4 +30,6 @@ if settings.DEBUG: urlpatterns = urlpatterns + [path('__debug__/', include(debug_toolbar.urls)), ] + +if settings.MEDIA_STORAGE == 'FS': urlpatterns = urlpatterns + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)