-. - LocalStructureProperty. , ( Google ) , , . , , , , , "". LocalStructuredProperties , . ( ) , - localStructuredProperty , .
, , , NDB json
.
class Character(ndb.Model):
name = stringProperty()
weaponList = StructuredProperty(WeaponModel.Weapon, repeated=True)
class WeaponModel(ndb.Model):
name = stringProperty()
curseList = StructuredProperty(BufferModel.Curse, repeated=True)
class BufferModel(ndb.Model):
name = stringProperty()
, : StructuredProperty , .
.
1) datastore db ( ndb) List
weaponList = ListProperty (WeaponModel.Weapon)// , ,
, Listproperty (, , ), . .
weaponList = ListProperty (db.key)
. , , - , - public private.
. - , - - json NDB?
- :
aCurse = getcurse
aJsonCurse = json.dump(aCurse)
aWeapon = getWeapon(curseList=[aJsonCurse])
aJsonWeapon = json.dump(aWeapon)
aCharacter.weaponList = [aJsonWeapon]
. json, json, json . , -, , .
, , . LocalStructured , , , , , - . , , - , .
, .