Skip to content

Instantly share code, notes, and snippets.

@rdegges
Created February 18, 2010 17:54
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 rdegges/307889 to your computer and use it in GitHub Desktop.
Save rdegges/307889 to your computer and use it in GitHub Desktop.
from django.contrib.auth import logout
from django.http import HttpResponseRedirect
from django.shortcuts import render_to_response
def main_page(request):
return render_to_response('index.html')
def logout_page(request):
"""
Log users out and re-direct them to the main page.
"""
logout(request)
return HttpResponseRedirect('/')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment