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

Solution: Import the 'generic' module

# Add the following line to the top of your code
from django.views import generic

 

For more information:
django generic