I would like to be able to
- Compile all js/css into single minified files, which is what
django-compressordoes. - Be able to add js/css files from included and inherited templates.
When I try:
{% compress css file %}
{% render_block "css" %}
{% endcompress %}
I get the error: Invalid block tag: 'endcompress'
But I think the main cause is from the sekizai docs:
{% render_block %}tags must not be placed inside a template tag block (a template tag which has an end tag, such as{% block %}...{% endblock %}or{% if %}...{% endif %}).
Have I done something wrong or is there another way?
It seems django-compressor explicitly provides this interaction, but not by putting
render_blockinsidecompress/endcompress:In fact, the
{% compress %}tag is simply not used here.I use
block cssjust for the sake of having any block to putaddtoblockin, otherwise it won't work (unless it's in the same template file):