djangoo user take over code example
Example 1: django import user
from django.contrib.auth.models import User
Example 2: django request user
def my_view(request):
if not request.user.is_authenticated:
return render(request, 'myapp/login_error.html')