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,797
  • 2
  • 32
  • 48

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
  • 72,985
  • 14
  • 101
  • 108