This is what I want to write:
categories|last.translated_name
Where categories is a list of Category objects and translated_name is a function in the Category class.
This is the error when the above invalid syntax is used:
Could not parse the remainder: '.tra开发者_运维问答nslated_name' from 'categories|last.translated_name'
{% with categories|last as last_category %}
{{ last_category.translated_name }}
{% endwith %}
精彩评论