5
我使用django-compressor
来编译和缩小我的静态资产。我有一些来自Angular或其他Django库的模板,最终被扔进我的staticfiles
目录,我不想django_compressor
压缩。事实上,当它运行在他们目前,它抛出了很多嘈杂的错误:Tell 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
忽略某些目录/文件?
也许你可以定义自定义过滤器来忽略某些文件? – maazza