开发者

Django in Aptana: Have to restart server for changes in python code to take affect

开发者 https://www.devze.com 2023-01-24 17:40 出处:网络
Unless I\'m going crazy, I didn\'t have to do this as of a few days ago. For example, changes to HTML files do not require a s开发者_如何学Goerver restart to take affect, but when I do simple modifica

Unless I'm going crazy, I didn't have to do this as of a few days ago. For example, changes to HTML files do not require a s开发者_如何学Goerver restart to take affect, but when I do simple modifications to, say, my views.py file, I need to restart the server. Is this how it is and I'm am actually going crazy, or is there a configuration that needs fixing?

Also, my debugger stopped working at around the same time. I set breakpoints in functions I know should get touched, but when I debug the code, it stops at "manage.py" in the debug tree. I'm wondering if the two problems are related.


I found the answer to this on a random foot note on a blog some where!

In Aptana under preference (or any where else you deal/launch the run server) do this: Aptana -> Preference -> Pydev -> Interpreter - Python -> "Environment" tab add a new variable here called: PYTHONUNBUFFERED = Y Name = Value ..

vola! it works now no more reloading of the runserver .. or resaving of your py file to trigger a print out.

0

精彩评论

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

关注公众号