def responses(self): yield [ mapping.Column(self.name), mapping.Column(self.tag), mapping.Column(self.position), mapping.List(mapping.Definition('content'), key='children') ]
def responses(self): base: List[Any] = [ mapping.Column(self.tag), mapping.Column(self.created_on), mapping.Column(self.published_on) ] yield base yield 'complete', base + [ mapping.List(mapping.Definition('article', 'toc'), key='articles') ]
def responses(self): base = self.get_mixin('historized').response(self) yield [mapping.Column(self.key)] yield "from_page", [ mapping.Column(self.key), mapping.Field(types.db.String, name='languages', function=lambda a: dict( ((p.language.name, p.name) for p in a.pages))) ] yield "complete", [ mapping.Column(self.key), mapping.List(mapping.Definition('page'), key='pages') ] + base
def responses(self): base = self.get_mixin('historized').response(self) yield [ mapping.Column(self.name) ] yield "list", [ mapping.Column(self.name), mapping.Field(types.db.String, name='language', function=lambda x: x.language.name), mapping.Field(types.db.Integer, name='article', function=lambda x: x.article.key) ] yield 'complete', [ mapping.Column(self.name), mapping.Field(types.db.Integer, name='version_count', function=lambda page: len(page.versions)), mapping.Definition('version', key='last_version'), mapping.Definition('article', 'from_page', key='article') ] + base
def responses(self): base: Any = [ mapping.Column(self.name), mapping.Column(self.position), mapping.Column(self.lang) ] yield base with_anchors = base + [ mapping.List(mapping.Definition('content'), function=self._get_top_anchors, name='anchors') ] yield 'toc', with_anchors yield 'complete', with_anchors + [ mapping.Column(self.markdown), mapping.Column(self.html) ]
def payloads(self): yield 'new', [ mapping.Column(self.name, required=True), mapping.Field(types.db.String, key='content') ]
def responses(self): base = self.get_mixin('historized').response(self) yield [mapping.Column(self.content)] + base
def responses(self): yield [mapping.Column(self.name), mapping.Column(self.default)]
def payloads(self): yield [mapping.Column(self.name, required=True)]