jezdez/django_compressor — Issue #174: Give special treatment to manifest.json
Author: waylybaye
Created: 2011-12-04 07:51:01+00:00
State: open

`Django==1.3.1, django-compressor==dev`

I serve all my static files on a CDN network and I use django-compressor in development env as this:

./manage.py compress

I write a custom storage to upload compressed files to CDN.

**Problems**:

1. It wirte `manifest.json` to `STATIC_ROOT` which not in git repos.
2. manifest.json was uploaed to CDN too.
3. I pushed the code to production server and it slowed down the page loading. It read manifest.json to get offline cache every time page was loaded and it tooks 0.4 - 0.5s to do that.

So why don't put manifest into a normal path and cached it when app server was started.

I have an idea to do that.

compress command output manifest.json to a settings.py like file such as manifest.py. So just `from manifest.py import *` in settings.py .
And `reader_offline` could use `get_offline_hexdigest(xx) in settings.COMPRESSOR_MANIFEST ...` to get the offline cache.