1 {% extends 'base.html' %}
4 <h1>{% block title %}Dashboard{% endblock %}
</h1>
5 {% if g.user and perm == 'ADMIN' %}
6 <a class=
"action" href=
"{{ url_for('auth.register') }}">New User
</a>
7 <a class=
"action" href=
"{{ url_for('auth.update') }}">Manage Users
</a>
12 {% for post in posts %}
13 <article class=
"post">
16 <h1>{{ post['title'] }}
</h1>
17 <div class=
"about">by {{ post['username'] }} on {{ post['created'].strftime('%Y-%m-%d') }}
</div>
19 {% if g.user['id'] == post['author_id'] %}
20 <a class=
"action" href=
"{{ url_for('blog.update', id=post['id']) }}">Edit
</a>
23 <p class=
"body">{{ post['body'] }}
</p>
25 {% if not loop.last %}