def get(self):
     document_id = self.request.get("document_id")
     bunnies_result = Bunny.query(Bunny.document_id == str(document_id)).order(Bunny.timestamp).iter()
     bunnies = dict()
     for bunny in bunnies_result:
         print bunny.note
         raw_bunny = bunny
         bunny = bunny.to_dict()
         bunny['timestamp'] = str(bunny['timestamp'])
         bunnies[raw_bunny.key.id()] = bunny
     bunnies = json.dumps(bunnies)
     self.response.write(bunnies)
 def get(self, document_id):
     template_vals = {}
     bunnies_result = Bunny.query(Bunny.document_id == str(document_id)).order(Bunny.timestamp).iter()
     bunnies = []
     for bunny in bunnies_result:
         bunnies.append(bunny)
     template_vals['bunnies'] = bunnies
     template_vals['doc_id'] = document_id
     doc = Document.get_by_id(int(document_id))
     template_vals['doc_name'] = doc.title
     template_vals['lecture_id'] = doc.lecture_id
     render(self, template_vals, 'workspace.html')
 def post(self):
     bunny_id = self.request.get("bunny_id")
     bunny = Bunny.query(Bunny.id == bunny_id)