django-management-command

How to run migrations on specific database using call_command() in Django?

How to run migrations on specific database using call_command() in Django? Question: I’m just wondering what the correct syntax is for calling $ python manage.py migrate app_name –database db_name with the management.call_command() function at runtime. So far, I have the following: from django.core import management from django.core.management.commands import migrate # Migrate the core.contrib.dynamics if needed …

Total answers: 1