views.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:beg-django-e-commerce 作者: Apress 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号