开发者

How to reload the modified files without restarting in pylons?

开发者 https://www.devze.com 2023-01-12 16:29 出处:网络
I\'m using pylons, and using this command to start the server: paster serve --reload development.ini I found when I modify something, the paster will reload the application. In the console, it show

I'm using pylons, and using this command to start the server:

paster serve --reload development.ini

I found when I modify something, the paster will reload the application. In the console, it shows:

-------------------- Restarting --------------------
Starting server in PID 7476.
serving on http://127.0.0.1:5000

This is convenient but not enough, because it will cost 5 seconds more or less each time. If I refresh that page and the server is not reloaded completely yet, the page will display the old content, and I don't know if it is the lastest content, so I had to refresh the p开发者_开发问答age several times to make sure.

I wonder if there is a better way to read the modified content without reloading, or find a quicker reloading?


To controllers, you can configure Routes to rescan the directory controllers without restart application:

http://pylonshq.com/docs/en/1.0/controllers/#adding-controllers-dynamically

0

精彩评论

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