我怎样才能得到一批收藏品

2024-04-25 23:43:26 发布

您现在位置:Python中文网/ 问答频道 /正文

我有这些模型:

class Country(db.Model):
    name    = db.StringProperty()
    code    = db.StringProperty()

class Course(db.Model):
    name          = db.StringProperty()
    description   = db.StringProperty()
    country       = db.ReferenceProperty(Country, collection_name='courses')

class Application():
    status    = db.StringProperty()
    course    = db.ReferenceProperty(Course, collection_name='applications')

一个国家有许多课程,一门课程有许多应用。 那么我怎样才能得到一个国家所有申请的查询呢? 有可能吗?你知道吗


Tags: name模型dbmodelcodedescriptioncountryclass