質問を変更します。ManyToMany
との関係db.Model
を適用したいNDB
。例
NDB
モデル
class my_NDB(search.SearchableModel):
.......
.......
db
モデル
class Test(search.SearchableModel):
email = db.StringProperty()
created_by = db.IntegerProperty()
ManyToMany
これらのモデル間に関係を適用できますか?
編集:
これが私のUser
モデルです
class User(model.Expando):
"""Stores user authentication credentials or authorization ids."""
#: The model used to ensure uniqueness.
unique_model = Unique
#: The model used to store tokens.
token_model = UserToken
created = model.DateTimeProperty(auto_now_add=True)
updated = model.DateTimeProperty(auto_now=True)
# ID for third party authentication, e.g. 'google:username'. UNIQUE.
auth_ids = model.StringProperty(repeated=True)
# Hashed password. Not required because third party authentication
# doesn't use password.
email = model.StringProperty(required=True)
is_active = model.BooleanProperty(required=True)
password = model.StringProperty()
そして、これが私のTest
db
モデルです
class Test(search.SearchableModel):
email = db.StringProperty()
created_by = db.IntegerProperty()
今、テストに manyToMany を適用したいと思います。出来ますか?
Django スタイルの多対多
created_by = models.ManyToManyField(User)