Django Redirect the Logout Process to a View -
i new django, have following template:
{% if settings.login_system %} <a href="{{ settings.logout_url }}?target={{ settings.logout_redirect_url}}">{% trans %}sign out{% endtrans %}</a> {% endif %}
i have view clears out session:
class logoutview(templateview): redirect_field_name = "target" def get(self, *args, **kwargs):
i want make sure login signal goes through logoutview method. can call view method template?
if example great.
example logout
@require_post def logout(request): auth.logout(request) return redirect('/')
Comments
Post a Comment