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

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -