Пример #1
0
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)
Пример #2
0
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)
Пример #3
0
 def __init__(self, app, **atts):
     BaseDocument.__init__(self, app, **atts)
     self.diskconfig = DiskConfigHandler(self.conn)
Пример #4
0
 def __init__(self, app, **atts):
     BaseDocument.__init__(self, app, **atts)
     self.diskconfig = DiskConfigHandler(self.conn)