Login

Snippets by PetrDlouhy

Snippet List

Make HTML5 appcache manifest slice work with django-compress compressed files

I needed to make appcache for my application which used django-compress for JS and CSS compression. This is, how I solved the problem with putting compressed files into the manifest. I went for offline compression (with `COMPRESS_OFFLINE=True`). This snippet shows code of command file (put it in `apps/cyklomapa/management/commands/compress_create_manifest.py`), which creates `compress_cache_manifest.txt` file in my templates. Then I just use `{% include "compress_cache_manifest.txt" %}` in my appcache template.

  • html5
  • django-compress
  • appcache
Read More

PetrDlouhy has posted 1 snippet.