ryanmcgrath / django-rednoise

An opinionated addon for WhiteNoise, with a focus on Django environments.
Other
18 stars 2 forks source link

Notice

If you've used Django Rednoise before, thanks! I'm glad it was helpful. Unfortunately, this project was built for Whitenoise < 2, and I've simply never found the time to update it, hence why I'm archiving it. If you'd like to, feel free to fork it and take ownership of it. :)

RedNoise

Django as a framework is great, but file handling within any setup has never been particularly fun to configure. WhiteNoise makes this, to borrow its own term, "radically simplified", and for the most part I've found it to be an ideal solution - though there are a few things I found myself wanting from time to time.

RedNoise is a different take on the DjangoWhiteNoise module from WhiteNoise. It aims to be (and as of writing, should be) completely compatible with the existing WhiteNoise API, but takes a different approach on a few things. I consider this an opinionated third-party addon to the WhiteNoise project, however I hope it goes without saying that anything here is up for grabs as a pull request or merge.

Getting Started

  1. pip install django-rednoise
  2. Follow the WhiteNoise configuration guidelines - they all should work.
  3. Modify your wsgi file as follows:
from django.core.wsgi import get_wsgi_application
from rednoise import DjangoRedNoise

application = get_wsgi_application()
application = DjangoRedNoise(application)

...and that's it. You can read on for additional configuration options if you think you need them, but the defaults are more or less sane. DjangoRedNoise is the only Class in this package; existing guides/documentation for WhiteNoise should still suffice.

Differences from WhiteNoise

License

MIT Licensed

Contact

Questions, concerns? ryan [at] venodesigns dot net