Beispiel #1
0
def login_logout(request):
  request.user = None
  redirect_to = '/'
  c = template.RequestContext(request, locals())
  t = loader.get_template('login/templates/logout.html')

  response = http.HttpResponse(t.render(c))
  response = user.clear_user_cookie(response)
  return response
Beispiel #2
0
def login_logout(request):
    request.user = None
    redirect_to = '/'
    c = template.RequestContext(request, locals())
    t = loader.get_template('login/templates/logout.html')

    response = http.HttpResponse(t.render(c))
    response = user.clear_user_cookie(response)
    return response
Beispiel #3
0
def login_logout(request):
  request.user = None
  redirect_to = '/'
  flash = "You have signed out! You are no longer signed in to %s" % util.get_metadata('SITE_NAME')
  c = template.RequestContext(request, locals())
  t = loader.get_template('login/templates/logout.html')

  #response = http.HttpResponseRedirect(redirect_to)
  response = util.RedirectFlash(redirect_to, flash)
  response = user.clear_user_cookie(response)
  return response