我剛剛將Django 1.4.2升級到1.5,並開始在django_compressor上遇到錯誤。django升級後脫機壓縮(django_compressor應用程序)錯誤
You have offline compression enabled but key "eb225276268ea55d3b90c71df63109d9" is missing from offline manifest. You may need to run "python manage.py compress".
此外,我更新django_compressor到最後的版本(實際1.2),仍然得到相同的錯誤。
當我嘗試python manage.py compress
我注意到:
c:\python27\lib\site-packages\django\utils\hashcompat.py:9: DeprecationWarning: django.utils.hashcompat is deprecated; use hashlib instead DeprecationWarning)
,這個消息與離線壓縮錯誤有關係嗎?
[增訂] 我發現另一個有趣的事情......
在,我有問題,我刪除了所有的CSS應該壓縮的模板:
{% extends "base.html" %}
{% block head %}
{% load compress %}
{% compress css %}
{% endcompress %}
{% endblock %}
...
我跑蟒蛇管理:
python manage.py compress
python manage.py collectstatic --noinput
沒有錯誤。
但是...問題仍然存在。
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
另一個重要信息:.html文件被列爲當我跑python manage.py compress
https://github.com/jezdez/django_compressor/issues/131 – catherine 2013-02-27 03:14:18