class DiskConfigDoc(BaseDocument): def __init__(self, app, **atts): BaseDocument.__init__(self, app, **atts) self.diskconfig = DiskConfigHandler(self.conn) def set_diskconfig(self, diskconfig): row = self.diskconfig.get(diskconfig) self.clear_body() title = SectionTitle('DiskConfig: %s' % row.name) self.body.append(title) content = row.content if content is None: content = '' pre = Pre(content) self.body.append(pre) self.body.append(Ruler()) editanchor = Anchor('edit', href='edit.diskconfig.%s' % row.name) self.body.append(editanchor) self.body.append(Ruler()) deleteanchor = Anchor('delete', href='delete.diskconfig.%s' % row.name) self.body.append(deleteanchor)
def __init__(self, app, **atts): BaseDocument.__init__(self, app, **atts) self.diskconfig = DiskConfigHandler(self.conn)