how to get user from request in django code example
Example: django request user
def my_view(request):
if not request.user.is_authenticated:
return render(request, 'myapp/login_error.html')
def my_view(request):
if not request.user.is_authenticated:
return render(request, 'myapp/login_error.html')