Answers for "django run system commands"

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

Python Answers by Framework

Browse Popular Code Answers by Language