Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Javascript Follow/Unfollow, No Redirection #380

Open
bobozar opened this issue Mar 20, 2018 · 1 comment
Open

Javascript Follow/Unfollow, No Redirection #380

bobozar opened this issue Mar 20, 2018 · 1 comment
Labels
docs Documentation additions or fixes

Comments

@bobozar
Copy link

bobozar commented Mar 20, 2018

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>
@asdfkaba
Copy link
Contributor

Use the Follow/Unfollow API from actstream and send ajax requests to it.
What is unclear?

@justquick justquick added the docs Documentation additions or fixes label Feb 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation additions or fixes
Projects
None yet
Development

No branches or pull requests

3 participants