Django templates | Jinja2 |
---|---|
{{ block.super }} | {{ super() }} |
{{ forloop.counter }} | {{ loop.index }} |
{% cycle %} | {{ loop.cycle }} |
{{ v | default:"-" }} | {{ v | default('-', true) }} |
{{ v | default_if_none:"-" }} | {{ v if v is not None else '-' }}[*] |
{{ d | date:"Y-m-d H:m:s" }} | {{ d.strftime('%Y-%m-%d %H:%M:%S') }} |
[*] | http://stackoverflow.com/questions/11146619/suppress-none-output-as-string-in-jinja2 |
comments powered by Disqus