Common template syntax

inside the framework django %%} and {} {} {Usage
{%}% logic code
from beginning to end
{%}% for Students. Student in
.......
{%} endfor%
. 1
2
. 3
{{}} variable Code
module for use and the use of the variable filter module

I'm a list of {{list}}


1

The general syntax of the template
need only remember two special symbols:
{} {} and {%}%
variable associated with {{}}, {logic associated with %%}.
For example:
{%}% for Person in person_list

{{ person.name }}


{% endfor %}

Guess you like

Origin www.cnblogs.com/abdm-989/p/11806631.html