【发布时间】:2015-02-28 19:37:48
【问题描述】:
我正在尝试使用 django-compressor 压缩我的 CSS 文件,但我不断收到此错误:
compressor.exceptions.OfflineGenerationError: You have offline compression enabled but key "8369f4e513fa5b733304f4b22c67ad97" is missing from offline manifest. You may need to run "python manage.py compress".
但是,我检查了清单文件,密钥确实在那里。
我已经尝试过使用和不使用COMPRESS_OFFLINE=True,并且我没有使用任何内联 CSS。
我没有使用任何特殊的缓存后端,它是使用 Django 1.7.1 和 django-compressor 1.4 的单服务器设置。
我的模板设置如下:
base.html
{% load compress %}
{% compress css %}
{% block extraCSS %}
<link href="/static/bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"/>
<link href="/static/css/mimir-navbar.css" rel="stylesheet">
<link href="/static/css/global-custom.css" rel="stylesheet">
{% endblock %}
{% endcompress %}
我还有其他几个使用 base.html 如下:
{% block extraCSS %}
{{ block.super }}
<link rel="stylesheet" type="text/css" href="/static/web_user/css/adminPanel.css"/>
{% endblock %}
关于我可能做错的任何想法?提前致谢。
【问题讨论】:
标签: css django django-compressor