'RegistrationTestModel 没有属性 '_deferred'

发布于 2024-09-05 18:15:17 字数 1512 浏览 2 评论 0原文

我正在尝试让 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

醉生梦死 2024-09-12 18:15:17

您是否正在使用 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

凤舞天涯 2024-09-12 18:15:17

看起来您正在尝试加载依赖于 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文