Initial commit
This commit is contained in:
commit
c33a74711c
15 changed files with 606 additions and 0 deletions
30
templates/user_detail.html
Normal file
30
templates/user_detail.html
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{% extends "base.html" %}
|
||||
{% block body %}
|
||||
<h2>Messages from {{ user.username }}</h2>
|
||||
<p>
|
||||
<strong>{{ user.messages|count }}</strong> messages
|
||||
-
|
||||
<strong>{{ user.followers()|count }}</strong> followers
|
||||
-
|
||||
<strong>{{ user.following()|count }}</strong> following
|
||||
</p>
|
||||
{% if current_user %}
|
||||
{% if user.username != current_user.username %}
|
||||
{% if current_user|is_following(user) %}
|
||||
<form action="{{ url_for('user_unfollow', username=user.username) }}" method="post">
|
||||
<input type="submit" value="- Un-follow" />
|
||||
</form>
|
||||
{% else %}
|
||||
<form action="{{ url_for('user_follow', username=user.username) }}" method="post">
|
||||
<input type="submit" value="+ Follow" />
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<ul>
|
||||
{% for message in message_list %}
|
||||
<li>{% include "includes/message.html" %}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% include "includes/pagination.html" %}
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue