Example #1
0
 def GET(self, post_id):
     comm_idxs = r.get_list(r.post_key(post_id, "comm.list", raw=True))
     comments = []
     for cid in comm_idxs:
         body = r.comm(post_id, cid)
         date = r.comm_key(post_id, cid, "comm_date")
         comments.append({"url": cid, "comm_body": body, "comm_date": date})
     ctx = {"post_id": post_id, "comments": comments}
     return {"ctx": ctx}
Example #2
0
 def GET(self, post_id):
     comm_idxs = r.get_list(r.post_key(post_id, 'comm.list', raw=True))
     comments = []
     for cid in comm_idxs:
         body = r.comm(post_id, cid)
         date = r.comm_key(post_id, cid, 'comm_date')
         comments.append({'url': cid, 'comm_body': body, 'comm_date': date})
     ctx = {'post_id': post_id, 'comments': comments}
     return {'ctx': ctx}
Example #3
0
 def GET(self, post_id, comm_id):
     body = r.comm(post_id, comm_id)
     date = r.comm_key(post_id, comm_id, 'comm_date')
     ctx = {
         'post_id': post_id,
         'comm_id': comm_id,
         'comm_body': body,
         'comm_date': date
     }
     return {'ctx': ctx}
Example #4
0
 def GET(self, post_id, comm_id):
     body = r.comm(post_id, comm_id)
     date = r.comm_key(post_id, comm_id, "comm_date")
     ctx = {"post_id": post_id, "comm_id": comm_id, "comm_body": body, "comm_date": date}
     return {"ctx": ctx}