How to use django-compressor with apache? How to use django-compressor with apache? apache apache

How to use django-compressor with apache?


If you've run compress, and you still get the message

OfflineGenerationError: You have offline compression enabled but key "4971a40e3b459a8cda8287a7f7caa96d" is missing from offline manifest. You may need to run "python manage.py compress"

then it's likely you have dynamic content inside compress tags. Make sure that compress is always the innermost block, and that there are no tags inside the compress block.


I guess you're using django-compressor 1.1.2 which doesn't support static template tag {% static "..." %}.

Try installing the dev version of django-compressor with:

pip install django_compressor==dev

It should solve the problem.


David Wolfe is absolutely right: had to dig throught all the code of mine to get rid of {% trans... etc.I make it like this:

<script>window.__enter_email = "{% trans "Enter correct email" %}"window.__url = "{% url "shop:go" %}"</script>{% compress js %}<script>$("#bla")..... window.__enter_email ...</script>{% endcompress %}

Hope, helps someone!