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 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
|
{% extends "page.html" %}
{% block body %}
{{ super() }} {# super duper! #}
<p>The title of this page is a <b>string</b> field. ^^</p>
{# bool1 #}
<p>
<b>booleans:</b>
<br>
{% if this.boolean1 %}
Boolean1 caused True text!
{% else %}
Boolean1 caused False text!
{% endif %}
Boolean1 = {{ this.boolean1 }}
{# bool2 #}
<br>
{% if this.boolean2 %}
Boolean2 caused True text!
{% else %}
Boolean2 caused False text!
{% endif %}
Boolean2 = {{ this.boolean2 }}
</p>
{# checkboxes #}
<p>
Of the <b>checkboxes</b> 1-4, boxes
{% for box in this.checkboxes %}
{{ "and " if loop.last }} {{ box }}{{ ", " if not loop.last }}
{% endfor %}
are checked.
</p>
{# dates #}
<p>
A <b>date</b>: {{ this.date }}
<br>
A <b>datetime</b> formatted three ways:
<ul>
<li>{{ this.datetime }}</li>
<li>{{ this.datetime.strftime('%Y-%m-%d %H:%M') }}</li>
<li>{{ this.datetime.strftime('%m/%d/%Y %H:%M') }}</li>
</ul>
</p>
{# numbers #}
<p>
A <b>float</b>: {{ this.float }} and {{ this.floataddon }}
<br>
A <b>int</b>: {{ this.int }} and {{ this.intaddon }}
</p>
{# flow blocks #}
<p>
These <b>flow blocks</b> are called manually from the main template for this page:
<br>
{% for blk in this.flow.blocks %}
{{ blk.text }}
{% endfor %}
and all 'html' blocks with the additional templates in templates/blocks/:
<br>
{{ this.flow }}
</p>
<p>
Raw <b>HTML</b>:
<br>
{{ this.html }}
</p>
<p>
<b>markdown</b>:
{{ this.markdown }}
</p>
<p>
<b>strings</b>:
{{ this.strings }}
<br>
{% for string in this.strings %}
{{ "and " if loop.last }} {{ string }}{{ ", " if not loop.last }}
{% endfor %}
</p>
<p>
Unformatted <b>text</b>:
{{ this.text }}
</p>
<p>
<b>sort_key</b>: {{ this.sort_key }}
</p>
{% endblock body %}
|