How to Solve NameError: name 'call_command' is not defined -- django
Solution: Import the 'call_command' module
To Solve the error, add the following line to the top of your code.
from django.core.management import call_command
For more information:
Python django call_command