I have a datetime object in my model. I send it to the view, but in html I do not know what to write to format it.
I'm trying to
{{ item.date.strftime("%Y-%m-%d")|escape }}
but i get
TemplateSyntaxError: Could not parse some characters: item.date.strftime|("%Y-%m-%d")||escape
when i just use
{{ item.date|escape }}
It works, but now with the format I want.
Any suggestions?
source share