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

Solution: Import the 'UserCreationForm' module

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

 

For more information:
django UserCreationForm