Django Doesn't See Static Files
Solution 1:
Go some steps back and set up static files and make sure it follows exactly django docs
This project has similar structure as yours
When collectstatic is run, the default STATICFILES_FINDERS value django.contrib.staticfiles.finders.FileSystemFinder will collect your static files from any paths that you have in STATICFILES_DIRS.
The other default STATICFILES_FINDERS value django.contrib.staticfiles.finders.AppDirectoriesFinder will look in the /static/ folder of any apps in your INSTALLED_APPS.
All of the static files that are found will be placed in the specified STATIC_ROOT directory.
STATIC_URL = '/static/'
STATICFILES_DIRS = [
os.path.join(BASE_DIR, "static"),
]
STATIC_ROOT = os.path.join(os.path.dirname(BASE_DIR), "static_cdn")
You can also use python manage.py findstatic to see which directories collectstatic will look in.
manage.py findstatic
Solution 2:
Currently you have a typo - STATIC_DIRS instead of STATICFILES_DIRS, so collectstatic is not configured at all currently.
Fix it, then run collectstatic
again.
Post a Comment for "Django Doesn't See Static Files"