2023-05-07 15:30:29 +03:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
|
|
|
|
|
|
{% block title %}Index{% endblock %}
|
|
|
|
|
|
|
|
|
|
|
|
{% block head %}
|
|
|
|
{{ super() }}
|
|
|
|
<style type="text/css">
|
|
|
|
.important { color: #336699; }
|
|
|
|
</style>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
|
|
|
{{title}}
|
|
|
|
|
|
|
|
|
|
|
|
{# content #}
|
|
|
|
{% block content %}
|
|
|
|
<h1>Index</h1>
|
|
|
|
<p class="important">
|
|
|
|
Welcome to my awesome homepage.
|
|
|
|
</p>
|
|
|
|
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
<div></div>
|
|
|
|
|
|
|
|
{{name}}
|
|
|
|
|
|
|
|
|
|
|
|
{% for user in users %}
|
|
|
|
<li>{{ user.username|e }}</li>
|
|
|
|
|
|
|
|
|
|
|
|
{% else %}
|
|
|
|
<li><em>no users found</em></li>
|
|
|
|
|
|
|
|
{% endfor %}
|
2023-05-14 12:26:48 +03:00
|
|
|
|
|
|
|
{% macro input(name, value='', type='text', size=20) %}
|
|
|
|
|
|
|
|
{{ my_variable|default('my_variable is not defined') }}
|
|
|
|
|
|
|
|
{% for city, items in users|groupby("city") %}
|
|
|
|
<li>{{ city }}
|
|
|
|
<ul>{% for user in items %}
|
|
|
|
<li>{{ user.name }}
|
|
|
|
{% endfor %}</ul>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
{% endmacro %}
|