How to disable intermediate signout page in Django allauth

前端 未结 3 1000
太阳男子
太阳男子 2021-02-18 19:24

How to disable the intermediate signout page from django allauth. When the user clicks on the signout link on my site I want him to logout right away, I want to remove this inte

3条回答
  •  独厮守ぢ
    2021-02-18 19:49

    Here's another shortcut for preserving the POST request, if you don't want to mess with styling the form button with something like this:

    Hide the form:

    {% csrf_token %}

    Submit with a click event attached to whatever element you've already styled:

    $(document).on('click', '#signOutLink', function() {
        $('#signOutBtn').click()
    });
    

提交回复
热议问题