开发者

Why must I restart fastcgi process for Django? [duplicate]

This question already has an answer here: Closed 11 years ago.

Possible Duplicate:

Django, Nginx, FastCGI caching problem when I change code

Currently I use Nginx + fastcgi to run Django applications. After I change the source code of a Python file in a 开发者_开发问答web application, I always see the old version of application from browser. It seems that it doesn't include my changes. Only after I restart the fastcgi process of Django, my changes take effect. Is there a way to make my changes take effect immediately without restart any processes? (I run Nginx and Python in Windows for debugging.)


New changes aren't reflected until after restart because your code is loaded into memory when the server is started. The only reason why the django development environment doesn't suffer this is because it is constantly watching the filesystem for changes and auto-reloads when it detects a change.

There are some solutions discussed here and here.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜