【发布时间】:2015-08-22 10:44:07
【问题描述】:
我使用django-compressor 来编译和缩小我的静态资产。我有一些来自 Angular 或其他 Django 库的模板,这些模板最终会被扔到我的 staticfiles 目录中,我不希望 django_compressor 压缩这些模板。事实上,当它当前在它们上面运行时,它会抛出很多嘈杂的错误:
Error parsing template /app/.heroku/python/lib/python2.7/site-packages/suit/templates/admin/filer/image/change_form.html: 'filermedia' is not a valid tag library: Template library filermedia not found, tried django.templatetags.filermedia,django.contrib.staticfiles.templatetags.filermedia,django_select2.templatetags.filermedia, <...>
Invalid template /app/staticfiles/profile-page/bower_components/angular-strap/src/datepicker/datepicker.tpl.html: Could not parse the remainder: '$iconLeft' from '$iconLeft'
有没有办法告诉django-compressor 忽略某些目录/文件?
【问题讨论】:
-
也许您可以定义自定义过滤器来忽略某些文件?
标签: python django django-compressor