djaango login code example Example: django logout user def logout_request(request): logout(request) return redirect("")