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