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

Erorr: name 'CurrentSiteManager' is not defined

NameError: name 'CurrentSiteManager' is not defined

Solution: Import the 'CurrentSiteManager' module

# Add the following line to the top of your code
from django.contrib.sites.managers import CurrentSiteManager

 

For more information:
django CurrentSiteManager