django test pass user in request.user 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')