Exemplo n.º 1
0
 def get(self, id):
     r = getmsg(id)
     if not r:
         self.redirect('/')
     else:
         info = dict()
         info['id'] = r['id']
         info['who'] = r['who'].encode('utf-8')
         info['text'] = r['t'].encode('utf-8')
         if r['answer_id']:
             pass
         else:
             info['answer'] = '尚未产生'
     self.render(info=info, re=getreply(id))
Exemplo n.º 2
0
Arquivo: msg.py Projeto: 42qu/znote
 def get(self,id):
     r = getmsg(id)
     if not r:
         self.redirect('/')
     else:
         info = dict()
         info['id'] = r['id']
         info['who'] = r['who'].encode('utf-8')
         info['text'] = r['t'].encode('utf-8')
         if r['answer_id']:
             pass
         else:
             info['answer'] = '尚未产生'
     self.render(info=info,re=getreply(id))
Exemplo n.º 3
0
Arquivo: msg.py Projeto: 42qu/zqa
 def get(self,id):
     r = getmsg(id)
     if not r:
         self.redirect('/')
     else:
         info = dict()
         info['id'] = r['id']
         info['who'] = r['who'].encode('utf-8')
         info['text'] = r['t'].encode('utf-8')
         if r['answer_id']:
             re = getreply(r['answer_id'])
             info['answer'] = {
                 'text': re['t'].encode('utf-8').replace(r'\n','<br />'),
                 'who' : re['who'].encode('utf-8')
             }
         else:
             info['answer'] = {'text':'尚未产生','who':None}
     self.render(info=info,re=getreplys(id))
Exemplo n.º 4
0
Arquivo: msg.py Projeto: alemic/zqa
 def get(self, id):
     r = getmsg(id)
     if not r:
         self.redirect('/')
     else:
         info = dict()
         info['id'] = r['id']
         info['who'] = r['who'].encode('utf-8')
         info['text'] = r['t'].encode('utf-8')
         if r['answer_id']:
             re = getreply(r['answer_id'])
             info['answer'] = {
                 'text': re['t'].encode('utf-8').replace(r'\n', '<br />'),
                 'who': re['who'].encode('utf-8')
             }
         else:
             info['answer'] = {'text': '尚未产生', 'who': None}
     self.render(info=info, re=getreplys(id))