def google_logout(request, next_page=None,
template_name='registration/logged_out.html'):
if users.get_current_user():
# Redirect to this page until the session has been cleared.
logout_url = users.create_logout_url(next_page or request.path)
return HttpResponseRedirect(logout_url)
if not next_page:
return render_to_response(request, template_name,
{'title': _('Logged out')})
return HttpResponseRedirect(next_page)
评论列表
文章目录