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

Solution: Import the 'SuspiciousOperation' module

# Add the following line to the top of your code
from django.core.exceptions import SuspiciousOperation

 

For more information:
django SuspiciousOperation