is the Django management command executed in a separate process?
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".
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?