Exemple #1
0
 def post(self):
     payload = json.loads(self.request.body)
     org = Organization.get_by_id(int(payload['organization']))
     inv = Invitation(parent=org)
     inv.email = payload['email']
     inv.put()
     inv.send()
Exemple #2
0
 def get(self):
     id = self.request.url.rsplit('/', 2)[1]
     print id
     inv = Invitation.get(id)
     inv.decline()
Exemple #3
0
 def get(self):
     id = self.request.url.rsplit('/', 1)[1]
     inv = Invitation.get(id)
     self.response.out.write(json.dumps({'title': inv.parent().title}))