Skip to content

Instantly share code, notes, and snippets.

@chriskief

chriskief/signout.py

Created Oct 24, 2013
Embed
What would you like to do?
from django.views.generic.base import RedirectView
from django.contrib.auth import logout
from django.core.urlresolvers import reverse
class SignOut(RedirectView):
permanent = False
query_string = True
def get_redirect_url(self):
logout(self.request)
return reverse('home')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment