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

Solution: Import the 'BaseLoader' module

# Add the following line to the top of your code
from django.template.loader import BaseLoader

 

For more information:
django BaseLoader