Answers for "django gunicorn static file not found"

0

none

#All You need is dj-static package
pip install dj-static

#Configure your static assets in settings.py:
STATIC_ROOT = 'staticfiles'
STATIC_URL = '/static/

#Then, update your wsgi.py file to use dj-static
from django.core.wsgi import get_wsgi_application
from dj_static import Cling

application = Cling(get_wsgi_application())

#Add to Your urls.py
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
#after urlpatterns=
Posted by: Guest on January-01-1970

Code answers related to "django gunicorn static file not found"

Python Answers by Framework

Browse Popular Code Answers by Language