Skip to content

Instantly share code, notes, and snippets.

@chriskief
Created October 24, 2013 02:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chriskief/7130337 to your computer and use it in GitHub Desktop.
Save chriskief/7130337 to your computer and use it in GitHub Desktop.
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