question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use Whitenoise for Django?

See original GitHub issue

Observed 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:closed
  • Created 5 years ago
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
rtibblescommented, Mar 26, 2021

Thanks @adamchainz - it took us two years, but Kolibri is now using Whitenoise!

0reactions
adamchainzcommented, Mar 26, 2021

Congrats!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found