Google App Engine 上的 Django-nonrel,在使用 Django 0.96 时出现错误
我正在使用 Django Appengine http://www.allbuttonspressed.com/projects/djangoappengine 所以我可以使用 Django 1.3,一切似乎都工作正常。
但是,当打开页面时,我的 PyDev 控制台(OS 10.6、Aptana Studio 2.0、Python 2.5)会显示以下消息:
警告:root:您正在使用默认值 Django 版本(0.96)。默认 Django 版本将在应用程序中更改 引擎将在不久的将来发布。 请调用 use_library() 来 显式选择 Django 版本。 欲了解更多信息,请参阅 http://code.google.com/appengine/docs/python /tools/libraries.html#Django
错误提供的链接似乎只讨论使用:
from google.appengine.dist import use_library
use_library('django', '1.1')
如果我使用 GAE 的 django,我知道我需要这样做。但是,我使用的是 django-nonrel,为什么当我应该使用 1.3 时它会警告我我正在使用 0.96?
I'm using Django Appengine http://www.allbuttonspressed.com/projects/djangoappengine so I can use Django 1.3 and everything seems to work fine.
However, when opening pages my PyDev console (OS 10.6, Aptana Studio 2.0, Python 2.5) puts out this message:
WARNING:root:You are using the default
Django version (0.96). The default
Django version will change in an App
Engine release in the near future.
Please call use_library() to
explicitly select a Django version.
For more information see
http://code.google.com/appengine/docs/python/tools/libraries.html#Django
The link the error provides seems to only talk about using:
from google.appengine.dist import use_library
use_library('django', '1.1')
If I was using GAE's django I understand I'd need to do this. However, I'm using django-nonrel, why would it warn me I'm using 0.96 when I should be using 1.3?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您能否检查项目的 PYTHONPATH 设置(右键单击该项目,单击“首选项”,然后选择“PYTHONPATH”)?确保 PYTHONPATH 中没有 GAE SDK 的 django 文件夹。如果在那里列出,只需将其删除即可。这应该消除警告。
Could you please check your project's PYTHONPATH setting (right-click the project, click on Preferences, and select PYTHONPATH)? Make sure that you do NOT have the GAE SDK's django folder in your PYTHONPATH. If it's listed there just remove it. This should get rid of the warning.
我还没有玩过 Django-nonrel。如果不是这样,并且您使用 Django 1.3,那么添加
到
appengine_config.py
(并删除use_library
的使用)将解决您的问题。既然您已经准备好运行实验,请尝试并报告。
I haven't played with Django-nonrel yet. If not for that, and your using Django 1.3, then adding
to
appengine_config.py
(and removing uses ofuse_library
) would solve your problem. Since you're already set up to run the experiment, tryand report back.