Trying to server staticfiles via runserver for development, with Django 1.10
I have 'django.contrib.staticfiles'
in my INSTALLED_APPS
and the following relevant settings:
STATICFILES_FINDERS = (
"django.contrib.staticfiles.finders.AppDirectoriesFinder",
"django.contrib.staticfiles.finders.FileSystemFinder",
)
STATICFILES_DIRS = [
path('node_modules'), # resolves to `node_modules/` in the project root
]
STATIC_URL = '/static/'
STATIC_ROOT = path('static') # resolves to `path/` in the project root
This works fine for collectstatic, and serves fine via NginX directly.
However with runserver + DEBUG=True
, I'm expecting Django webserver to serve from the static/
folder, but instead it is serving from node_modules/
folder.
If I remove/rename node_modules/
then I get 404s for static files.
The static files are collected by copy (not symlink).
I'm using Django channels which could be hijacking everything as well?