Skip to content

Commit 8d0f724

Browse files
committed
Fix
1 parent 211d295 commit 8d0f724

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

300/312.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ index.py的代码不变,只修改模板index.html的代码,重点理解模
9696
<p>I will print the elements of this list in order.</p>
9797
{% for element in info %}
9898
<p>{{element}}</p>
99-
{% end %}
99+
{\% end %}
100100
<br>
101101
{% for index,element in enumerate(info) %}
102102
<p>info[{{index}}] is {{element}}
@@ -129,18 +129,18 @@ index.py的代码不变,只修改模板index.html的代码,重点理解模
129129
<p>I will print the elements of this list in order.</p>
130130
{% for element in info %}
131131
<p>{{element}}</p>
132-
{% end %}
132+
{\% end %}
133133
<br>
134134
{% for index,element in enumerate(info) %}
135135
<p>info[{{index}}] is {{element}}
136136
{% if element == "python" %}
137137
<p> <b>I love this language--{{element}}</b></p>
138138
{% end %}
139-
{% end %}
139+
{\% end %}
140140

141141
{% if "[email protected]" in info %}
142142
<p><b>A Ha, this the python lesson of LaoQi, It is good! His email is {{info[2]}}</b></p>
143-
{% end %}
143+
{\% end %}
144144
<h2>Next, I set "python-tornado"(a string) to a variable(var)</h2>
145145
{% set var="python-tornado" %}
146146
<p>Would you like {{var}}?</p>
@@ -154,5 +154,3 @@ index.py的代码不变,只修改模板index.html的代码,重点理解模
154154
看官发现了吗?我用`{% set var="python-tornado" %}`的方式,将一个字符串赋给了变量`var`,在下面的代码中,就直接引用这个变量了。这样就是实现了模板中变量的使用。
155155

156156
Tornado的模板真的功能不少呢。不过远非这些,后面还有。敬请等待。
157-
158-
[首页](./index)&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;[上一讲:使用表单和模板](./311.md)

0 commit comments

Comments
 (0)