最近做的功能,涉及ORM,数据明明已经插入数据库,但在页面上却查不到,一开始以为是cache的问题,但最后google发现是Django和uwsgi直接衔接出了问题:
Using #django 1.5 on #uwsgi ? You'll want at least 1.3, otherwise DB connections aren't closed between requests.
解决办法就是升级uwsgi
参考:
https://twitter.com/raphaelbarrois/status/337924659666362368
https://groups.google.com/forum/#!topic/django-users/8OgkXAjuvDM