Chapeter 8

This commit is contained in:
2023-06-04 01:00:41 +02:00
parent 8c1df34587
commit d81f038422
8 changed files with 245 additions and 4 deletions

View File

@@ -17,10 +17,25 @@
</td>
</tr>
</table>
<p>{{ user.followers.count() }} followers, {{ user.followed.count() }} following.</p>
{% if user == current_user %}
<p>
<a href="{{ url_for('edit_profile') }}">Edit your profile</a>
</p>
{% elif not current_user.is_following(user) %}
<p>
<form action="{{ url_for('follow', username = user.username) }}" method="post">
{{ form.hidden_tag() }}
{{ form.submit(value = 'Follow') }}
</form>
</p>
{% else %}
<p>
<form action="{{ url_for('unfollow', username = user.username) }}" method="post">
{{ form.hidden_tag() }}
{{ form.submit(value = 'Unfollow') }}
</form>
</p>
{% endif %}
<hr />
{% for post in posts %}