django get name of command run at CLI code example Example: python django shell command $ python manage.py shell ... >>> execfile('myscript.py')