1.4.X STATICFILES_FINDERS
See original GitHub issueI was able to prove that certain combinations of STATICFILES_FINDERS will result in no html output (no stylesheets or javascript on the rendered page).
On 1.3.X I was using:
STATICFILES_FINDERS = [
"pipeline.finders.FileSystemFinder",
"pipeline.finders.AppDirectoriesFinder",
"pipeline.finders.PipelineFinder",
"pipeline.finders.CachedFileFinder",
]
After upgrading to 1.4.x and updating my templates to use the new tags pipeline
, stylesheet
, javascript
I discovered the problem and found that using the following works:
STATICFILES_FINDERS = [
"django.contrib.staticfiles.finders.FileSystemFinder",
"django.contrib.staticfiles.finders.AppDirectoriesFinder",
"pipeline.finders.PipelineFinder",
"pipeline.finders.CachedFileFinder",
]
Issue Analytics
- State:
- Created 9 years ago
- Comments:18 (5 by maintainers)
Top Results From Across the Web
The staticfiles app — Django 1.4.6 documentation
The list of finder backends that know how to find static files in various locations. The default will find files stored in the...
Read more >9. Integrating a third-party application — django cms 3.8.0 ...
Add the boilerplates static files finder to STATICFILES_FINDERS , immediately before django.contrib.staticfiles.finders.AppDirectoriesFinder :.
Read more >Pipeline Documentation - Read the Docs
Add the PipelineFinder to STATICFILES_FINDERS. STATICFILES_FINDERS = ( ... To upgrade to pipeline 1.4, you will need to follow theses steps:.
Read more >The staticfiles app - Django documentation
STATICFILES_FINDERS. Management Commands¶. django.contrib.staticfiles exposes three management commands.
Read more >Django: serving static file on debug=false - Stack Overflow
ls -la shows drwxr-xr-x. On my pc im not under htaccess, not that i know of. and on production, its on Heroku. –...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Following up: I’ve just read the
finder.py
sourcecode and found this:If
FileSystemFinder
is supposed to ignore CSS, SCSS, JavaScript, etc files, how could it ever find the files to work with? Either it is very wrong or we’re all missing the point of how/when to use it.Including
pipeline.finders.AppDirectoriesFinder
intoSTATICFILES_FINDERS
breaks collectstatic for me as well. While source says that it excludes certain types of files on purpose to avoid copying them toSTATIC_ROOT
, I did not find any trace of logic in storage to resolve source files when compiling configured packages. As of version 1.6.11 I used for debugging it just follows the regular logic of static files storage, i.e. prepending requested files withSTATIC_ROOT
meaning that although it excludes files from collection it still looks for them inSTATIC_ROOT
😦