开发者

What can I do if django runserver seems to be caching my urls.py and settings.py?

开发者 https://www.devze.com 2022-12-21 06:13 出处:网络
I detected this problem when updating the patterns in URLConf and seeing that the new pattern wasn\'t matched anywhere.

I detected this problem when updating the patterns in URLConf and seeing that the new pattern wasn't matched anywhere.

So, with urls.py I don't get anywhere when writing random lines on it, I mean, invalid code, and django doesn't throw any exception and serves the urls just fine.

So I checked ROOT_URLCONF in settings.py, and it points to "projectname.urls" so it's reading the right file. I tried deleting urls.py, and the server keeps running and se开发者_开发知识库rving just fine. Then I deleted settings.py, just to see if it wasn't being read, and that gave me the expected exception.

I deleted all *.pyc too, restarted runserver many times, and even restarted the whole computer. I also tried deleting the db and running syncdb again.

I created a new empty project, and it runs just fine.

I'm running the latest development version: Django version 1.2 beta 1 SVN-12617, using settings 'cms.settings'

I am asking for any kind of help of how to override this behavior, I mean, there must be something that's misconfigured.


You're not running what you think you're running. Check your PYTHONPATH.

0

精彩评论

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

关注公众号