django user request 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')