Luís Fernando
Luís Fernando

Reputation: 133

Possible to use WhiteNoise with Django-Compressor?

I'm new with Django, and I'm trying to automate and optimize my deployment for production. At this moment I use WhiteNoise to handle static files, but as far as I know he just handle and compress the static files.
Recently I found out about this tool: https://github.com/django-compressor/django-compressor , but I don't know if it really worth it to drop WhiteNoise in order to use this Django-Compressor, since I've never heard of it and every guide recommends to use WhiteNoise for safety and stability reasons.

It's possible to use both in the same project? If yes, how? If not, worth changing it to use in a PaaS like Heroku?

Upvotes: 3

Views: 1305

Answers (1)

D. Evans
D. Evans

Reputation: 3292

It should be possible to use WhiteNoise and Django Compressor together. You will need to use Django Compressor's offline compression mode and, if you are using Heroku, you will need to add a bin/post_compile script to run the compression.

See this ticket for details: https://github.com/django-compressor/django-compressor/issues/486#issuecomment-258909167

Upvotes: 1

Related Questions