Chapter 8

This commit is contained in:
2023-06-04 01:17:48 +02:00
parent d81f038422
commit c91b89da5f
6 changed files with 44 additions and 19 deletions

View File

@@ -2,11 +2,20 @@
{% block content %}
<h1>Hi, {{ current_user.username }}!</h1>
{% for post in posts %}
<div>
{% if form %}
<form action="" method="post">
{{ form.hidden_tag() }}
<p>
{{ post.author.username }} says: <b>{{ post.body }}</b>
{{ form.post.label }}<br />
{{ form.post(cols = 32, rows = 4) }}<br />
{% for error in form.post.errors %}
<span style="color: red;">[{{ error }}]</span>
{% endfor %}
</p>
</div>
<p>{{ form.submit() }}</p>
</form>
{% endif %}
{% for post in posts %}
{% include "_post.html" %}
{% endfor %}
{% endblock %}
{% endblock %}s