How to Solve NameError: name 'AbstractUser' is not defined -- django

Solution: Import the 'AbstractUser' module

To Solve the error, add the following line to the top of your code.

from django.contrib.auth.models import AbstractUser

 

For more information:
Python django AbstractUser