Answers for "django run management command from shell"

3

python django shell command

$ python manage.py shell
...
>>> execfile('myscript.py')
Posted by: Guest on April-03-2020
0

django run management command from code

from django.core.management import call_command

call_command('my_command', 'foo', bar='baz')
Posted by: Guest on May-24-2021

Code answers related to "django run management command from shell"

Python Answers by Framework

Browse Popular Code Answers by Language