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

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -