account for users following themselves in profile page follower counts
This commit is contained in:
parent
ee8626e600
commit
a9f0774c36
|
@ -43,4 +43,4 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<h1>{{user.nickname}}</h1>
|
<h1>{{user.nickname}}</h1>
|
||||||
{% if user.about_me %}<p>{{user.about_me}}</p>{% endif %}
|
{% if user.about_me %}<p>{{user.about_me}}</p>{% endif %}
|
||||||
{% if user.last_seen %}<p><em>Last seen on: {{user.last_seen}}</em></p>{% endif %}
|
{% if user.last_seen %}<p><em>Last seen on: {{user.last_seen}}</em></p>{% endif %}
|
||||||
<p>Followers: {{user.followers.count()}} | Following: {{user.followed.count()}} |
|
<p>Followers: {{user.followers.count() - 1}} | Following: {{user.followed.count() - 1}} |
|
||||||
{% if user.id == g.user.id %}
|
{% if user.id == g.user.id %}
|
||||||
<a href="{{url_for('edit')}}">Edit your profile</a>
|
<a href="{{url_for('edit')}}">Edit your profile</a>
|
||||||
{% elif not g.user.is_following(user) %}
|
{% elif not g.user.is_following(user) %}
|
||||||
|
@ -35,4 +35,4 @@
|
||||||
<li class="next disabled"><a href="#">Older posts</a></li>
|
<li class="next disabled"><a href="#">Older posts</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Reference in New Issue