Пример #1
0
def logout(request):
    if request.user.is_authenticated:
        LOGOUT(request)
        messages.success(request, "Thanks for the time!")
    else:
        messages.error(request, 'You need to be signed in to sign out')
    return redirect(reverse('login'))
Пример #2
0
def logout(req):
    """ Logs out a logged-in user.
        Input: s:request object.
        Output: HttpResponseRedirect object returned by redirect() function.
    """
    LOGOUT(req)
    return redirect(index)
Пример #3
0
def logout(req):
    LOGOUT(req)
    return redirect(index)
Пример #4
0
def logout(request):
    LOGOUT(request)
    return redirect('blog:login')
Пример #5
0
def logout(request):
    LOGOUT(request)
    return HttpResponseRedirect('/')