开发者

Django restart server or httpd

开发者 https://www.devze.com 2023-01-16 13:01 出处:网络
In django framework,When there are changes in urls.py or model.py or views.py .We would开发者_高级运维 restart httpd.

In django framework,When there are changes in urls.py or model.py or views.py .We would开发者_高级运维 restart httpd.

But as the documentation says we could restart runserver to get the latest changes.

Which is the best efficient way for doing the above


runserver.py restarts automatically every time you modify any .py file, but when you are using apache you have to restart the proccess manually.


touch your_project_name.wsgi and save without any change. It will change data modify and django will automatically reloading code.


runserver refers to the development server that is distributed with Django. Restarting this one or your httpd are the same thing, in both cases you restart the webserver. If you're using apache, you are not using the development server that is startet by runserver.py.


Type fg in terminal to take job front and then type Ctr+c to stop server and then run

Python manage.py runserver 
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号