python - Executing a Django Shell Command from the Command Line -
i execute command via django's manage.py shell function solely command line
e.g.
manage.py shell -c "from myapp import models; print models.mymodel.some_calculation()"
the came way might use -c option normal python interpreter
e.g.
python -c "print 'hello world'"
however, don't see equivalent -c option manage.py shell
. there way this?
not that. easy enough write standalone script django.
Comments
Post a Comment