Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compress files with django_compressor to gzip

I use django_compressor to compress my js and css files. It creates combined files successfully. But this app also allow to zip files. To enable this I created

COMPRESS_STORAGE = 'compressor.storage.GzipCompressorFileStorage'

in my settings.py. In compressor work dir there are now gzip files for css and js. But after checking html with firebug it looks like gzip files are not during rendering process. How can I change it?

like image 793
szaman Avatar asked Sep 15 '25 03:09

szaman


1 Answers

django-compressor disables most of its actual machinery in development (DEBUG=True) for obvious reasons, so it's likely this too will only work in production.

like image 191
Chris Pratt Avatar answered Sep 16 '25 22:09

Chris Pratt