How to Solve NameError: name 'login_required' is not defined -- django
Erorr: name 'login_required' is not defined
NameError: name 'login_required' is not defined
Solution: Import the 'login_required' module
# Add the following line to the top of your code
from django.contrib.auth.decorators import login_required
For more information:
django login_required