Пример #1
0
    def get(self):
        individual = Individual.get_by_id(int(self.request.get('id')))
        individual.name = self.request.get('name')
        individual.put()

        self.response.headers['Content-Type'] = 'application/json'
        self.response.write(json.dumps(individual.serialize()))
Пример #2
0
    def get(self):
        individual = Individual.get_by_id(int(self.request.get('id')))
        individual.name = self.request.get('name')
        individual.put()

        self.response.headers['Content-Type'] = 'application/json'
        self.response.write(json.dumps(individual.serialize()))
Пример #3
0
    def get(self):
        old_id = int(self.request.get('primary_id'))
        new_id = self.request.get('assigned_id')
        individual = Individual.get_by_id(old_id)
        individual.assigned_id = new_id
        individual.put()

        self.response.headers['Content-Type'] = 'application/json'
        self.response.write(json.dumps({'success': True}))
Пример #4
0
    def get(self):
        old_id = int(self.request.get('primary_id'))
        new_id = self.request.get('assigned_id')
        individual = Individual.get_by_id(old_id)
        individual.assigned_id = new_id
        individual.put()

        self.response.headers['Content-Type'] = 'application/json'
        self.response.write(json.dumps({'success': True}))
Пример #5
0
    def get(self):
        ids = json.loads(self.request.get('ids'))
        record = Team(user=-1,
                      paid=False,
                      name="Individual Team",
                      year=get_year())
        record.put()
        for i in ids:
            indiv = Individual.get_by_id(i)
            indiv.team = record.key.id()
            indiv.put()

        self.response.headers['Content-Type'] = 'application/json'
        self.response.write(json.dumps({"success": True}))
Пример #6
0
    def get(self):
        ids = json.loads(self.request.get('ids'))
        record = Team(
            user = -1,
            paid = False,
            name = "Individual Team",
            year = get_year()
        )
        record.put()
        for i in ids:
            indiv = Individual.get_by_id(i)
            indiv.team = record.key.id()
            indiv.put()

        self.response.headers['Content-Type'] = 'application/json'
        self.response.write(json.dumps({"success": True}))