Пример #1
0
 def buildreport(self, category=None):
     items = Hardware.select (order_by=Hardware.c.description)
     items = [(x.field_name, x.description) for x in items]
     tform = TableForm ("Build a Hardware report", fields =
                        [CheckBoxList("hardware",
                                      options=items,
                                      validator=Int())],
                        action = '/showreport',
                        submit_text = "Build report!")
     return dict(tform=tform)
Пример #2
0
 def _get_hardware_items(self):
     items = Hardware.select(order_by=Hardware.c.description)
     return [(x.field_name, x.description) for x in items]