gunicorn media file serving

This commit is contained in:
vabene1111
2020-06-03 19:58:01 +02:00
parent d09c6dbfed
commit f9cb44c66b
4 changed files with 14 additions and 1 deletions

View File

@@ -25,5 +25,5 @@ urlpatterns = [
path('i18n/', include('django.conf.urls.i18n')),
]
if settings.DEBUG:
if settings.GUNICORN_MEDIA or settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)