how to run python files in django code example
Example 1: python django shell command
$ python manage.py shell
...
>>> execfile('myscript.py')
Example 2: runserver manage.py
python manage.py runserver
$ python manage.py shell
...
>>> execfile('myscript.py')
python manage.py runserver