Django 1.4 on App engine在升级到HRD后可与ndb一起使用,但不能与db一起使用

Django 1.4 on App engine在升级到HRD后可与ndb一起使用,但不能与db一起使用,django,google-app-engine,python-2.7,Django,Google App Engine,Python 2.7,从本地服务器进行跟踪: Traceback (most recent call last): File "/Users/pk/Desktop/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 266, in Handle resu

从本地服务器进行跟踪:

Traceback (most recent call last):
  File "/Users/pk/Desktop/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 266, in Handle
    result = handler(dict(self._environ), self._StartResponse)
  File "/Users/pk/Desktop/Lkos_hrd/los/src/common/zip-packages/django.zip/django/core/handlers/wsgi.py", line 219, in __call__
    self.load_middleware()
  File "/Users/pk/Desktop/Lkos_hrd/los/src/common/zip-packages/django.zip/django/core/handlers/base.py", line 45, in load_middleware
    mod = import_module(mw_module)
  File "/Users/pk/Desktop/Lkos_hrd/los/src/common/zip-packages/django.zip/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/Users/pk/Desktop/Lkos_hrd/los/src/website/middleware.py", line 1, in <module>
    from website.models import Preference, Person
  File "/Users/pk/Desktop/Lkos_hrd/los/src/website/models.py", line 7, in <module>
    from logic.persongroup import *
  File "/Users/pk/Desktop/Lkos_hrd/los/src/logic/persongroup.py", line 10, in <module>
    class PersonGroup(db.Model):
  File "/Users/pk/Desktop/Lkos_hrd/los/src/common/appenginepatch/appenginepatcher/patch.py", line 549, in __init__
    signals.class_prepared.send(sender=cls)
  File "/Users/pk/Desktop/Lkos_hrd/los/src/common/zip-packages/django.zip/django/dispatch/dispatcher.py", line 172, in send
    response = receiver(signal=self, sender=sender, **named)
  File "/Users/pk/Desktop/Lkos_hrd/los/src/common/zip-packages/django.zip/django/db/models/manager.py", line 36, in ensure_default_manager
    for base_class in default_mgr.mro()[1:]:
TypeError: Error when calling the metaclass bases
    descriptor 'mro' of 'type' object needs an argument
升级到Google app engine高分辨率和python 2.7后遇到了这个问题。作为测试,我将“google.appengine.ext import db”更改为“from google.appengine.ext import ndb”,并将例如class persondb.model更新为class personndb.model


然后,这该死的东西开始越过这个错误,但我必须改变每一个模型和属性,以移动到ndb,使整个工作。就好像它根本无法识别旧的db API,所以我猜我遗漏了什么

要想让Google App Engine Launcher+Django 1.4正常工作,你几乎只能靠自己了。人力资源部的开发工作已转移到Django Norel


我目前正在使用应用程序引擎补丁,因为我很高兴使用GAE模型而不是django模型。我认为这个错误表明我缺少了一个设置,而不是一个整体性的改变。另外,ndb起作用而db不起作用也很奇怪。我相信应用程序引擎补丁monkey补丁db.models可以为表单提供一些额外的功能。我假设这与Django 1.4不同。ndb是未动的,所以它加载良好。这对我来说是有意义的。很难找到有完全相同迁移问题的人,而且应用程序引擎补丁也没有更新。我可能只是尝试使用一个与patchYep一起工作的django的旧版本,回到django和er的1.1版本。。到目前为止,一切顺利。