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'))
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)
def logout(req): LOGOUT(req) return redirect(index)
def logout(request): LOGOUT(request) return redirect('blog:login')
def logout(request): LOGOUT(request) return HttpResponseRedirect('/')