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

Solution: Import the 'AuthenticationForm' module

# Add the following line to the top of your code
from django.contrib.auth.forms import AuthenticationForm

 

For more information:
django AuthenticationForm