django run command from code code example
Example: django run command from code
from django.core.management import call_command
call_command('my_command', 'foo', bar='baz')
from django.core.management import call_command
call_command('my_command', 'foo', bar='baz')