def create(self, report_id, cell_pos):
     r = Report.get(Key(report_id))
     z, x, y = Cell.cell_id(cell_pos)
     cell = Cell.get_or_create(r, x, y, z)
     data = json.loads(request.data)
     a = Area(geo=json.dumps(data["paths"]), type=data["type"], added_by=users.get_current_user(), cell=cell)
     a.save()
     cell.last_change_by = users.get_current_user()
     cell.put()
     return Response(a.as_json(), mimetype="application/json")
 def create(self, report_id, cell_pos):
     r = Report.get(Key(report_id))
     z, x, y = Cell.cell_id(cell_pos)
     cell = Cell.get_or_create(r, x, y, z)
     data = json.loads(request.data)
     a = Area(geo=json.dumps(data['paths']),
              type=data['type'],
              added_by=users.get_current_user(),
              cell=cell)
     a.save()
     cell.last_change_by = users.get_current_user()
     cell.put()
     return Response(a.as_json(), mimetype='application/json')