django python manage.py shell code example
Example 1: python django shell command
$ python manage.py shell
...
>>> execfile('myscript.py')
Example 2: django run manage.py from python
from django.core import management
management.call_command('loaddata', 'test_data', verbosity=0)