问题
I'm using a
tag with href like /disconnect/backend/
and then it shows me an empty page. I've tried {% url %}
template tag like:
{% url 'social:disconnect' 'twitter' %}
And it's still create same url as I've used in the tag. How could I disconnect account? Or maybe there are also a way to get only one account associated?
回答1:
Answer is very simple. You should use POST request. I've done it like those:
<form action="{% url 'social:disconnect' 'twitter' %}" method="post">
{% csrf_token %}
<button class="btn btn-warning btn-xs">
Disconnect
</button>
</form>
来源:https://stackoverflow.com/questions/31788762/python-social-auth-how-could-i-disconnect-in-django