2020-03-13 14:56:50 +00:00
|
|
|
{% if request.user in user.follower_requests.all %}
|
|
|
|
<div>
|
|
|
|
Follow request already sent.
|
|
|
|
</div>
|
|
|
|
{% elif not request.user in user.followers.all %}
|
2020-02-22 20:57:13 +00:00
|
|
|
<form action="/follow/" method="post">
|
|
|
|
{% csrf_token %}
|
|
|
|
<input type="hidden" name="user" value="{{ user.username }}"></input>
|
2020-03-14 14:09:10 +00:00
|
|
|
{% if user.manually_approves_followers %}
|
|
|
|
<input type="submit" value="Send follow request"></input>
|
|
|
|
{% else %}
|
|
|
|
<input type="submit" value="Follow"></input>
|
|
|
|
{% endif %}
|
2020-02-22 20:57:13 +00:00
|
|
|
</form>
|
|
|
|
{% else %}
|
|
|
|
<form action="/unfollow/" method="post">
|
|
|
|
{% csrf_token %}
|
|
|
|
<input type="hidden" name="user" value="{{ user.username }}"></input>
|
|
|
|
<input type="submit" value="Unfollow"></input>
|
|
|
|
</form>
|
|
|
|
{% endif %}
|