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

Erorr: name 'Paginator' is not defined

NameError: name 'Paginator' is not defined

Solution: name 'Paginator' is not defined

# Add the following line to the top of your code
from django.core.paginator import Paginator

 

For more information:
Django Paginator