Use Whitenoise for Django?
See original GitHub issueObserved behavior
On kolibri start
, Django’s collectstatic
is run, copying all the assets into the user’s home folder.
Expected behavior
Using Whitenoise for Django would allow the assets to be served directly by Django with surprisingly little overhead.
User-facing consequences
Files are unnecessarily duplicated on the server’s hard drive on startup.
Errors and logs
INFO Running update routines for new version...
INFO:kolibri.utils.cli:Running update routines for new version...
Copying '/Users/chainz/.virtualenvs/kolibri/lib/python3.7/site-packages/kolibri/core/static/default_frontend/3-0.11.1.js'
...
Copying '/Users/chainz/.virtualenvs/kolibri/lib/python3.7/site-packages/kolibri/plugins/document_epub_render/static/document_epub_render_module/document_epub_render_module0.11.1.css'
484 static files copied to '/Users/chainz/.kolibri/static'.
Steps to reproduce
kolibri start
on fresh install
Context
I use whitenoise for simple Django apps, it simplifies the static assets deployment process.
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (8 by maintainers)
Top Results From Across the Web
WhiteNoise 6.2.0 documentation
With a couple of lines of config WhiteNoise allows your web app to serve its own static files, making it a self-contained unit...
Read more >How to serve static files in Django using Whitenoise - Medium
1. Make sure staticfiles is configured correctly · 2. Enable WhiteNoise · 3. Add compression and caching support.
Read more >Using WhiteNoise for static files - Serverless Django with Zappa
Now edit the Django settings file to support WhiteNoise settings. Add these lines to the bottom of the file. This will enable WhiteNoise...
Read more >whitenoise/django.rst at main - GitHub
You can disable Django's static file handling and allow WhiteNoise to take over simply by passing the --nostatic option to the runserver command,...
Read more >whitenoise - PyPI
With a couple of lines of config WhiteNoise allows your web app to serve its own static files, making it a self-contained unit...
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 FreeTop 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
Top GitHub Comments
Thanks @adamchainz - it took us two years, but Kolibri is now using Whitenoise!
Congrats!