How to Solve NameError: name 'OperationalError' is not defined -- django
Solution: Import the 'OperationalError' module
To Solve the error, add the following line to the top of your code.
from django import OperationalError
For more information:
Python django OperationalError