update: sample templates
This commit is contained in:
parent
eaff212b63
commit
cf24e968ca
3 changed files with 66 additions and 0 deletions
28
templates/home.html
Normal file
28
templates/home.html
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Home - Meu Site{% endblock %}
|
||||
|
||||
{% block menu %}
|
||||
{{ block.super }}
|
||||
<li><a href="/blog">Blog</a></li>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Bem-vindo, {{ user.name }}!</h2>
|
||||
<span>{% now "d/m/Y H:i:s" %}</span>
|
||||
<p>Você tem {{ user.notifications }} notificações pendentes.</p>
|
||||
|
||||
<h3>Últimos itens:</h3>
|
||||
<ul>
|
||||
{% for item in itens %}
|
||||
<li>{{ forloop.counter }}: {{ item }}</li>
|
||||
{% empty %}
|
||||
<li>Nenhum item encontrado.</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
{% with msg="Olá mundo!" %}
|
||||
<p>Mensagem temporária: {{ msg|upper }}</p>
|
||||
{% endwith %}
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue