Django templates

后端 未结 1 1149
轻奢々
轻奢々 2021-01-14 11:28
{% for x in featured %}
  • {% if x.title|length > 12 %} {{x.title|slice:\":12\"}}... {% else %}

  • 1条回答
    •  既然无缘
      2021-01-14 12:16

      From the docs:

      To give your template access to these tags, put {% load i18n %} toward the top of your template.

      0 讨论(0)
    提交回复
    热议问题