forked from fxbois/web-mode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.dtl
41 lines (37 loc) · 810 Bytes
/
demo.dtl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<span>
{% for o in some_list %}
<tr class="{% cycle 'row1' 'row2' %}">
...{{ value|center:"15" }}
</tr>
{% endfor %}
</span>
{{ value|removetags:"b span"|safe }}
{{ some_list|safeseq|join:", " }}
{% for x, y in points %}
There is a point at {{ x }},{{ y }}
{% endfor %}
<ul>
<li>
{% autoescape on %}
This is escaped: {{ var1 }}
{% autoescape off %}
This is not escaped: {{ var1 }}
This is escaped: {{ var1|escape }}
{% endautoescape %}
{% endautoescape %}
</li>
<li>
{% if 99 99 %}
if: 99 and 99 are equal
{% else %}
else: 99 and 99 are not equal
{% endif %}
</li>
<li>
{% ifequal 99 99 %}
if: 99 and 99 are equal
{% else %}
else: 99 and 99 are not equal
{% endifequal %}
</li>
</ul>