Debian Codegraph @

examples/prism-django.html

raw symbols SCIP
1 <h2>Comment</h2>
2 <pre><code>{# This is a comment #}</code></pre>
3
4 <h2>Variable</h2>
5 <pre><code>{{ some_variable }}</code></pre>
6
7 <h2>Template Tag</h2>
8 <pre><code>{% if some_condition %}
9 Conditional block
10 {% endif %}
11 </code></pre>
12
13 <h2>Full Example</h2>
14 <pre><code>{# This is a Django template example #}
15 {% extends "base_generic.html" %}
16
17 {% block title %}{{ section.title }}{% endblock %}
18
19 {% block content %}
20 &lt;h1&gt;{{ section.title }}&lt;/h1&gt;
21
22 {% for story in story_list %}
23 &lt;h2&gt;
24 &lt;a href="{{ story.get_absolute_url }}"&gt;
25 {{ story.headline|upper }}
26 &lt;/a&gt;
27 &lt;/h2&gt;
28 &lt;p&gt;{{ story.tease|truncatewords:"100" }}&lt;/p&gt;
29 {% endfor %}
30 {% endblock %}
31 </code></pre>