django-activity-stream
django-activity-stream copied to clipboard
Javascript Follow/Unfollow, No Redirection
Can I get a proper documentation on how to use ajax or javascript to follow and unfollow objects then return - 'unfollow' if I follow and 'Follow' if I unfollow. Just like the way Twitter 'follow and unfollow' works. I don't want any redirection. Kindly help with what I'm missing.
In the template, I just have this.
<a href="{% follow_url other_user %}">
{% if request.user|is_following:other_user %}
stop following
{% else %}
follow
{% endif %}
</a>
Use the Follow/Unfollow API from actstream and send ajax requests to it. What is unclear?