django

1.注释

单行注释:

  {#  #}

多行注释:

  {%comment%}

  {%endcomment%}

2.访问元组

不用t[0],要用t.0。

例:

{% for t in text %}
  {{t.0}}-{{t.1}}:{{t.2}}</br>
{% endfor %}

原文地址:https://www.cnblogs.com/argenbarbie/p/5181584.html