accounts/views.py
def logout_user(request):
    """Log out the user, return redirect response."""
    if request.user.is_authenticated():
        logout(request)
        messages.success(request, 'You have been logged out successfully.')
    return HttpResponseRedirect(reverse('home_page'))
Log out the user, return redirect response.
Log out the user, return redirect response.
Log out the user return redirect response .
def logout_user(request):
    if request.user.is_authenticated():
        logout(request)
        messages.success(request, 'You have been logged out successfully.')
    return HttpResponseRedirect(reverse('home_page'))
def logout_user ( request ) : if request . user . is_authenticated ( ) : logout ( request ) messages . success ( request , 'You have been logged out successfully.' ) return HttpResponseRedirect ( reverse ( 'home_page' ) )
Log out the user, return redirect response.
Log out the user return redirect response .
"""Log out the user, return redirect response."""
request