feat(templates): Display author information in templates

This commit is contained in:
Vincent Ambo 2018-04-08 22:38:06 +02:00
parent 1c4d436eae
commit e761b2d295
2 changed files with 3 additions and 3 deletions

View file

@ -7,7 +7,7 @@
<h1>Welcome to Converse</h1>
<ul>
{% for thread in threads -%}
<li><a href="/thread/{{ thread.id }}">{{ thread.title }}</a> (posted at {{ thread.posted }})</li>
<li><a href="/thread/{{ thread.id }}">{{ thread.title }}</a> (posted at {{ thread.posted }} by {{ thread.author_name }})</li>
{%- endfor %}
</ul>
<hr>

View file

@ -6,9 +6,9 @@
<body>
<h1>{{ thread.title }}</h1>
<p>{{ thread.body }}<br><i>Posted at {{ thread.posted }}</i></p>
<p>{{ thread.body }}<br><i>Posted at {{ thread.posted }} by {{ thread.author_name }}</i></p>
{% for post in posts -%}
<li>{{ post.body }}<br><i>Posted at {{ post.posted }}</i></li>
<li>{{ post.body }}<br><i>Posted at {{ post.posted }} by {{ post.author_name }}</i></li>
{%- endfor %}
<hr>