Displaying following as well as followers on user profile.

This commit is contained in:
Adam Kelly 2020-02-24 15:23:14 +00:00
parent 8cbca4229f
commit d6e48f9a21

View file

@ -25,12 +25,25 @@
{% for follower in user.followers.all %}
<div>
<a href="{{ follower.actor }}">{{ follower.username }}</a>
{% if not request.user in follower.followers.all %}
{% if not request.user in follower.followers.all and request.user != follower %}
{% include 'snippets/follow_button.html' with user=follower %}
{% endif %}
</div>
{% endfor %}
</div>
<div>
<h2>Following</h2>
{% for following in user.following.all %}
<div>
<a href="{{ following.actor }}">{{ following.username }}</a>
{% if not request.user in following.followers.all and request.user != following %}
{% include 'snippets/follow_button.html' with user=following %}
{% endif %}
</div>
{% endfor %}
</div>
</div>
<div id="content">