コード例 #1
0
ファイル: apicontroller.py プロジェクト: elamperti/bastardbot
    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
コード例 #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}