Esempio n. 1
0
    def render(self, *args, **kwargs):
        # kind = kwargs['kind'] if 'kind' in kwargs else '1'
        catid = kwargs['catid'] if 'catid' in kwargs else ''
        recs = MCatalog.query_all()

        return self.render_string('modules/catalog/catalog_list.html',
                                  recs=recs,
                                  catid=catid)
Esempio n. 2
0
 def test_query_all(self):
     self.add_message()
     aa = MCatalog.query_all()
     tf = False
     for i in aa:
         if i.slug == self.slug:
             tf = True
     assert tf
     self.tearDown()