Why is run called twice in the Django dev server?

前端 未结 2 1580
感情败类
感情败类 2020-12-09 10:20

I want to make the Django development server do something before it starts running. To do this, I created a new app, added it to the top of INSTALLED_APPS, and

2条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-09 11:01

    The local development server runs a separate process for the auto-reloader. You can turn off the auto-reload process by passing the --noreload flag.

    python manage.py runserver --noreload
    

提交回复
热议问题