is the Django management command executed in a sep

2019-07-25 14:12发布

Django has many management commands. In addition, we can write our own commands.

What happens after I make a shell call python manage.py XXX? Will the code be executed in a process that launched from the shell? Or the shell process just communicates with the main Django process that executes the command?

1条回答
Viruses.
2楼-- · 2019-07-25 14:38

The shell starts a new process to run the Python interpreter. The Python interpreter reads manage.py and executes it directly. There's no such thing as "the main Django process".

查看更多
登录 后发表回答