What can I do if django runserver seems to be cach

2019-08-05 07:58发布

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 serving 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.

1条回答
beautiful°
2楼-- · 2019-08-05 08:25

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

查看更多
登录 后发表回答