'RegistrationTestModel 没有属性 '_deferred'
我正在尝试让 Django Shell 与 Google App Engine 一起使用。不幸的是,我收到以下错误:
AttributeError: type object 'RegistrationTestModel' has no attribute '_deferred'
有人知道如何解决这个问题吗?
堆栈跟踪:
WARNING:root:Could not read datastore data from /var/folders/X0/X0QgAfs7Hd8IcCVZOIkiCE+++TI/-Tmp-/django_content-sharer.datastore
WARNING:root:Could not initialize images API; you are likely missing the Python "PIL" module. ImportError: No module named _imaging
Traceback (most recent call last):
File "manage.py", line 30, in <module>
execute_manager(settings)
File "/Users/chris/Documents/workspace/ContentSharer/src/__init__.py", line 362, in execute_manager
File "/Users/chris/Documents/workspace/ContentSharer/src/__init__.py", line 303, in execute
File "/Users/chris/Documents/workspace/ContentSharer2/src/django/core/management/base.py", line 195, in run_from_argv
File "/Users/chris/Documents/workspace/ContentSharer2/src/django/core/management/base.py", line 222, in execute
File "/Users/chris/Documents/workspace/ContentSharer2/src/django/core/management/base.py", line 351, in handle
File "/Users/chris/Documents/workspace/ContentSharer/src/django/core/management/commands/shell.py", line 18, in handle_noargs
loaded_models = get_models()
File "/Users/chris/Documents/workspace/ContentSharer2/src/django/db/models/loading.py", line 166, in get_models
AttributeError: type object 'RegistrationTestModel' has no attribute '_deferred'
I am trying to get the Django Shell working with the Google App Engine. Unfortunately, I am getting the following error:
AttributeError: type object 'RegistrationTestModel' has no attribute '_deferred'
Does anyone have any idea of how to fix this?
Stack trace:
WARNING:root:Could not read datastore data from /var/folders/X0/X0QgAfs7Hd8IcCVZOIkiCE+++TI/-Tmp-/django_content-sharer.datastore
WARNING:root:Could not initialize images API; you are likely missing the Python "PIL" module. ImportError: No module named _imaging
Traceback (most recent call last):
File "manage.py", line 30, in <module>
execute_manager(settings)
File "/Users/chris/Documents/workspace/ContentSharer/src/__init__.py", line 362, in execute_manager
File "/Users/chris/Documents/workspace/ContentSharer/src/__init__.py", line 303, in execute
File "/Users/chris/Documents/workspace/ContentSharer2/src/django/core/management/base.py", line 195, in run_from_argv
File "/Users/chris/Documents/workspace/ContentSharer2/src/django/core/management/base.py", line 222, in execute
File "/Users/chris/Documents/workspace/ContentSharer2/src/django/core/management/base.py", line 351, in handle
File "/Users/chris/Documents/workspace/ContentSharer/src/django/core/management/commands/shell.py", line 18, in handle_noargs
loaded_models = get_models()
File "/Users/chris/Documents/workspace/ContentSharer2/src/django/db/models/loading.py", line 166, in get_models
AttributeError: type object 'RegistrationTestModel' has no attribute '_deferred'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否正在使用 Django 1.1.2 和助手?
如果是这样,则该帮助程序尚未针对 Django 1.1.2 进行更新。请务必获取该帮助程序的 r105 或更高版本。顺便说一句,据我所知,Django 1.1.2 尚未安装在 use_library 的生产环境中。尝试使用 Django 1.1.1,直到 1.1.2 可用于 GAE 生产并且帮助程序已更新。此票证中包含补丁:http://code.google.com/p/google-app-engine-django/issues/detail? id=171
更新:该帮助程序已使用 r105 http://code.google.com/p/google-app-engine-django/source/detail?r=105
Are you using Django 1.1.2 with the helper?
If so, the helper has not yet been updated for Django 1.1.2 yet.Be sure to get r105 or later of the helper. As a side note, Django 1.1.2 hasn't been installed on production for use_library yet, as far as I know.Try using Django 1.1.1 until 1.1.2 is available on GAE production and the helper has been updated.Patch is included in this ticket: http://code.google.com/p/google-app-engine-django/issues/detail?id=171
Update: the helper has been patched with r105 http://code.google.com/p/google-app-engine-django/source/detail?r=105
看起来您正在尝试加载依赖于 Django 模型的 Django 部分。 Django 模型不适用于 App Engine,因为它们依赖于关系数据库。
尝试使用 django-nonrel 。
It looks like you're trying to load a part of Django that depends on Django models. Django models do not work on App Engine, as they depend on a relational database.
Try django-nonrel instead.