2

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?

Victor Mezrin
  • 2,726
  • 2
  • 30
  • 44

1 Answers1

4

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".

Jim
  • 71,186
  • 14
  • 99
  • 104