How dos the code determine which team is assigned to manage.py?
-
I've got a method set up at every server launch:
class MyConfig(AppConfig): name = 'app' verbose_name = "Main app"
def ready(self): #что-то делает при запуске
I found out when the team started.
python manage.py migrate
He works too. The same situation as other commands transferred to manage.pyother than runserver♪
Like in the code to track what team was transferred. manage.pyin order to interrupt performance if this is not runserver?
-
If this code is in the file managed.
execute_from_command_line(sys.argv)
We'll check them for the right.
Alternatives
The establishment of its management team is recommended more than a test of arguments. This is an interesting decision, stackoverflow.com/questions/5942759/... simultaneous launch of the species /manage.py clearcache " ./manage.py runserver
Establishing your way to launch the server.
To do this, we're setting up our server team, partially copying the files. https://github.com/django/django/blob/master/django/utils/autoreload.py and https://github.com/django/django/blob/master/django/core/management/commands/runserver.py