예제 #1
0
def logout_view(request):
    return auth_logout(request,
                       template_name='registration/logout.html',
                       extra_context=site_name(request))
예제 #2
0
파일: views.py 프로젝트: tmkkk/oioioi
def logout_view(request):
    return AuthLogoutView.as_view()(
        request,
        template_name='registration/logout.html',
        extra_context=site_name(request),
    )
예제 #3
0
def login_view(request, redirect_field_name=REDIRECT_FIELD_NAME, **kwargs):
    if request.user.is_authenticated():
        redirect_to = request.GET.get(redirect_field_name, None)
        return safe_redirect(request, redirect_to)
    else:
        return auth_login(request, extra_context=site_name(request), **kwargs)
예제 #4
0
파일: views.py 프로젝트: sio2project/oioioi
def logout_view(request):
    return auth_logout(request, template_name='registration/logout.html',
            extra_context=site_name(request))
예제 #5
0
def login_view(request, redirect_field_name=REDIRECT_FIELD_NAME, **kwargs):
    if request.user.is_authenticated():
        redirect_to = request.REQUEST.get(redirect_field_name, None)
        return safe_redirect(request, redirect_to)
    else:
        return auth_login(request, extra_context=site_name(request), **kwargs)