account for users following themselves in profile page follower counts

This commit is contained in:
Miguel Grinberg 2012-12-31 13:07:54 -08:00
parent ee8626e600
commit a9f0774c36
2 changed files with 3 additions and 3 deletions

View File

@ -10,7 +10,7 @@
<h1>{{user.nickname}}</h1>
{% 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 %}
<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 %}
<a href="{{url_for('edit')}}">Edit your profile</a>
{% elif not g.user.is_following(user) %}