Beispiel #1
0
 def setUp(self):
     TestCase.setUp(self)
     self.db = startup(populate=False)
Beispiel #2
0
 def setUp(self):
     TestCase.setUp(self)
     self.db = startup(langs="en de fr")
Beispiel #3
0
 def setUp(self):
     TestCase.setUp(self)
     self.db = startup()
Beispiel #4
0
 def setUp(self):
     TestCase.setUp(self)
     self.db = startup()  # dump=True)
Beispiel #5
0
 def setUp(self):
     TestCase.setUp(self)
     self.db = startup(withJokes=True)
Beispiel #6
0
Datei: 28.py Projekt: vgrish/lino
 def setUp(self):
     TestCase.setUp(self)
     self.sess = startup()
Beispiel #7
0
        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()