How to apply multiple filters on a Django template variable?

Although it’s quite past when the OP posted the question, but for other people that may need the info, this seems to work well for me:

You can rewrite

{{ game.description|safe|slice:"65" }}

as

{% with description=game.description|safe %}
{{description|slice:"65"}}
{% endwith %}

Leave a Comment