Django shell でpythonスクリプトファイルの内容を実行する

$ python shell


$python shell
>>> exec(open('../').read())

How to execute a Python script from the Django shell?

You're not recommended to do that from the shell - and this is intended as you shouldn't really be executing random scripts from the django environment (but there are ways around this, see the other answers).


© 2024 Powered by AFFINGER5