Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Offline compression (django_compressor app) error after django upgrade

I just upgrade Django 1.4.2 to 1.5 and I started to get an error on django_compressor.

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

Also, I updated django_compressor to the last version (actual 1.2), and still getting the same error.

When I try python manage.py compress I am noticed that:

c:\python27\lib\site-packages\django\utils\hashcompat.py:9: DeprecationWarning: django.utils.hashcompat is deprecated; use hashlib instead DeprecationWarning)

Is this notice related with the offline compression error?

[UPDATED] I am finding another interesting thing...

In the template that I am having problem I removed all css that should be compressed:

 {% extends "base.html" %}
    {%  block head %}
        {% load compress %}
        {% compress css %}

        {% endcompress %}
    {% endblock %}
...

I ran python manage:

python manage.py compress 
python manage.py collectstatic   --noinput

without errors.

But... The problem still happen.

You have offline compression enabled but key "e764a8b7e7e314ed8c98aa5d25fc76b4" is missing from offline manifest. You may need to run "python manage.py compress".
1   {% extends "base.html" %}
2   {% block head %}
3   {% load compress %}
4   {% compress css %}
5   
6   {% endcompress %}
7   {% endblock %}
8   

Another important information: the .html file was listed when I ran python manage.py compress

like image 625
Thomas Avatar asked Nov 04 '22 03:11

Thomas


1 Answers

Well, I had to remove all {% load compress %} block from the internal pages, and included every js and css in the base.html. Now it worked. But I still finding very strange that this issue just happened after django update.

like image 118
Thomas Avatar answered Nov 15 '22 05:11

Thomas