2👍
Just in case someone run into this error again. While in Debug=False mode, Django won’t serve static files for you anymore. Your production server should take care of that. But, if you still want to test your app locally in debug=false you should run the devserver in insecure mode:
manage.py runserver --insecure
Taken from here: Why does DEBUG=False setting make my django Static Files Access fail?
0👍
What is your setting like your server?
According to the documentation, you should not write anything at STATIC_ROOT
Leave STATIC_ROOT
blank and instead, then, put the path in STATICFILES_DIRS
.
Hope this helps
- [Answered ]-How do I turn my urls into readable names?
- [Answered ]-Python won't assign the right value in simple "if" statement
0👍
I guess you are missing the following in your settings.py file
# List of finder classes that know how to find static files in
# various locations.
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
)
0👍
Config ERROR
in setting.py, you should add 'django.contrib.staticfiles'
in INSTALLED_APPS
the codes show:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.staticfiles',
......
OK,try it.
- [Answered ]-Accessing Sentry models in my Django Project
- [Answered ]-Google app engine and django templates: passing entity ids to the template engine
- [Answered ]-Change ChoiceField option after clean method in Django form
- [Answered ]-Different serializers for serializing/deserializing using Django REST framework
0👍
I had this problem just recently after changing dev machines.
It turned out that my new machine wasn’t set to run django apps in debug mode locally, so adding
DEBUG = True
To my dev machine’s settings.py sorted it.