def setUp(self): TestCase.setUp(self) self.db = startup(langs="en de fr")
def setUp(self): TestCase.setUp(self) self.db = startup()
def setUp(self): TestCase.setUp(self) self.db = startup(populate=False)
def setUp(self): TestCase.setUp(self) self.db = startup(withJokes=True)
def setUp(self): TestCase.setUp(self) self.sess = startup()
def setUp(self): TestCase.setUp(self) self.db = startup() # dump=True)
tcl = self.dbsess.getTableClass(args[0]) if tcl is not None: rpt = self.dbsess.getViewReport(tcl, *args[1:], **kw) showReport(doc, rpt) else: doc.append(html.P(args[0] + " : no such table")) return self.endResponse() list = html.UL() doc.append(list) for table in self.dbsess.db.app.getTableList(): li = html.LI() list.append(li) li.append( html.A(table.getLabel(), href="report/" + table.getTableName())) li.append(" (%d rows)" % len(self.dbsess.query(table._instanceClass))) return self.endResponse() report.exposed = True syscon.setToolkit(HtmlServer()) sess = pinboard_demo.startup() cherrypy.root = MyRoot(sess) cherrypy.server.start() sess.shutdown()
if len(args) > 0: tcl=self.dbsess.getTableClass(args[0]) if tcl is not None: rpt=self.dbsess.getViewReport(tcl,*args[1:],**kw) showReport(doc,rpt) else: doc.append(html.P(args[0]+" : no such table")) return self.endResponse() list=html.UL(); doc.append(list) for table in self.dbsess.db.app.getTableList(): li=html.LI() ; list.append(li) li.append(html.A(table.getLabel(), href="report/"+table.getTableName())) li.append(" (%d rows)" % len(self.dbsess.query(table._instanceClass))) return self.endResponse() report.exposed=True syscon.setToolkit(HtmlServer()) sess = pinboard_demo.startup() cherrypy.root = MyRoot(sess) cherrypy.server.start() sess.shutdown()