Ejemplo n.º 1
0
    def list(self, *args, **kwargs):        
        #res = cherrypy.thread_data.db.get_conversations()
        print (Conversation.select())
        conversations = []
        for item in res:
            conversations.append(cherrypy.thread_data.db.dict_factory(item))

        return conversations
Ejemplo n.º 2
0
 def conversations(self, conv_id=0):
     if conv_id is not 0:
         self.redirect('/log/' + conv_id)
     conversations = Conversation.select().where(Conversation.private == False)
     return {'conversations': conversations}