django run command code example
Example 1: python django shell command
$ python manage.py shell
...
>>> execfile('myscript.py')
Example 2: how to start a django project in terminal
django-admin startproject project_name
Example 3: run django server
python3 manage.py runserver
or
python manage.py runserver
Example 4: run django app
$ python manage.py runserver
Example 5: django run command from code
from django.core.management import call_command
call_command('my_command', 'foo', bar='baz')