Warning, file /frameworks/syntax-highlighting/autotests/html/highlight_django.html.dark.html was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 <!DOCTYPE html>
0002 <html><head>
0003 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
0004 <title>highlight_django.html</title>
0005 <meta name="generator" content="KF5::SyntaxHighlighting - Definition (Django HTML Template) - Theme (Breeze Dark)"/>
0006 </head><body style="background-color:#232629;color:#cfcfc2"><pre>
0007 {# Basic extension of a common file #}
0008 <span style="color:#8e44ad;">{% extends</span><span style="color:#8e44ad;"> </span><span style="color:#f44f4f;">&quot;base_file.html&quot;</span><span style="color:#8e44ad;"> </span><span style="color:#8e44ad;">%}</span>
0009 
0010 <span style="color:#8e44ad;">{% block</span><span style="color:#8e44ad;"> title </span><span style="color:#8e44ad;">%}</span><span style="color:#8e44ad;">{{ section.title }}</span><span style="color:#8e44ad;">{% endblock %}</span>
0011 
0012 <span style="color:#8e44ad;">{% block</span><span style="color:#8e44ad;"> content </span><span style="color:#8e44ad;">%}</span>
0013 <span style="font-weight:bold;">&lt;h1&gt;</span><span style="color:#8e44ad;">{{ section.title }}</span><span style="font-weight:bold;">&lt;/h1&gt;</span>
0014 
0015 {# For loop example #}
0016 
0017 <span style="color:#8e44ad;">{% for</span><span style="color:#8e44ad;"> item in item_list </span><span style="color:#8e44ad;">%}</span>
0018 <span style="font-weight:bold;">&lt;h2&gt;</span>
0019   <span style="font-weight:bold;">&lt;a</span><span style="color:#27ae60;"> href=</span><span style="color:#f44f4f;">&quot;</span><span style="color:#8e44ad;">{{ item.get_absolute_url }}</span><span style="color:#f44f4f;">&quot;</span><span style="font-weight:bold;">&gt;</span>
0020     <span style="color:#8e44ad;">{{ item.text }}</span>
0021     <span style="color:#8e44ad;">{{ item.other_text</span><span style="color:#27ae60;">|upper </span><span style="color:#8e44ad;">}}</span>
0022   <span style="font-weight:bold;">&lt;/a&gt;</span>
0023 <span style="font-weight:bold;">&lt;/h2&gt;</span>
0024 <span style="font-weight:bold;">&lt;p&gt;</span><span style="color:#8e44ad;">{{ story.longer_text</span><span style="color:#27ae60;">|truncatewords:</span><span style="color:#f44f4f;">&quot;100&quot;</span><span style="color:#27ae60;"> </span><span style="color:#8e44ad;">}}</span><span style="font-weight:bold;">&lt;/p&gt;</span>
0025 <span style="color:#8e44ad;">{% endfor %}</span>
0026 <span style="color:#8e44ad;">{% endblock %}</span>
0027 
0028 
0029 {# For loop example with specific content if empty #}
0030 
0031 <span style="color:#8e44ad;">{% for</span><span style="color:#8e44ad;"> item in other_list </span><span style="color:#8e44ad;">%}</span>
0032 <span style="font-weight:bold;">&lt;h2&gt;</span>
0033     <span style="color:#8e44ad;">{{ item.text }}</span>
0034 <span style="font-weight:bold;">&lt;/h2&gt;</span>
0035 <span style="color:#8e44ad;">{% else</span><span style="color:#8e44ad;"> </span><span style="color:#8e44ad;">%}</span>
0036 <span style="font-weight:bold;">&lt;h2&gt;</span>
0037     This list is empty
0038 <span style="font-weight:bold;">&lt;/h2&gt;</span>
0039 <span style="color:#8e44ad;">{% endfor %}</span>
0040 <span style="color:#da4453;text-decoration:underline;">{% endblock %}</span>
0041 
0042 
0043 {# if example #}
0044 
0045 <span style="color:#8e44ad;">{% if</span><span style="color:#8e44ad;"> item_list </span><span style="color:#8e44ad;">%}</span>
0046     Number of items: <span style="color:#8e44ad;">{{ item_list</span><span style="color:#27ae60;">|length </span><span style="color:#8e44ad;">}}</span>
0047 <span style="color:#8e44ad;">{% elif</span><span style="color:#8e44ad;"> some_condition </span><span style="color:#8e44ad;">%}</span>
0048     Show this text
0049 <span style="color:#8e44ad;">{% else</span><span style="color:#8e44ad;"> </span><span style="color:#8e44ad;">%}</span>
0050     Nothing to process
0051 <span style="color:#8e44ad;">{% endif %}</span>
0052 
0053 {# This is a comment #} hello comment
0054 
0055 
0056 {# Translation example #}
0057 
0058 <span style="color:#8e44ad;">{% translate</span><span style="color:#8e44ad;"> </span><span style="color:#f44f4f;">&quot;Title&quot;</span><span style="color:#8e44ad;"> as title </span><span style="color:#8e44ad;">%}</span>
0059 <span style="color:#8e44ad;">{% block</span><span style="color:#8e44ad;"> content </span><span style="color:#8e44ad;">%}</span><span style="color:#8e44ad;">{{ title }}</span><span style="color:#8e44ad;">{% endblock %}</span>
0060 
0061 
0062 {# Auto-escaping #}
0063 
0064 <span style="color:#8e44ad;">{% autoescape</span><span style="color:#8e44ad;"> off </span><span style="color:#8e44ad;">%}</span>
0065     Hello <span style="color:#8e44ad;">{{ name }}</span>
0066 <span style="color:#8e44ad;">{% endautoescape %}</span>
0067 
0068 
0069 {# Loading custom tags/libraries #}
0070 
0071 <span style="color:#8e44ad;">{% load</span><span style="color:#8e44ad;"> humanize </span><span style="color:#8e44ad;">%}</span>
0072 </pre></body></html>