Applying jinja2 filters to a block?
jinja2, python, templates
Solution
You can use filter sections:
{% block content %}
{% filter upper %}
Here is some content that will be rendered in upper case.
{% endfilter %}
{% endblock %}
Problem
Is it possible to apply jinja2 filters to `{% block ... %}` constructs? What I was hoping to do was something along the lines of: ``` {% block content|upper %} here is some content that will be rendered in upper case {% endblock %} ``` ...but this doesn't work; the above example will result in an error. Is there any other way to wrap a chunk of template text in a jinja2 filter?