added 'id' key in JSON response

This commit is contained in:
Aran Zaiger 2015-06-22 01:38:01 +03:00
parent e9e10bd980
commit 346d5b4aaa
6 changed files with 11 additions and 5 deletions

View file

@ -14,7 +14,8 @@ class Campus(db.Model):
data = {'title': self.title,
'email_ending': self.email_ending,
'master_user_id': self.master_user_id,
'avatar_url': self.avatar_url
'avatar_url': self.avatar_url,
'id' : self.key().id()
}
return json.dumps(data)

View file

@ -25,6 +25,7 @@ class Course(db.Model):
'year': self.endDate.year,
'month': self.endDate.month,
'day': self.endDate.day,
}
}
},
'id' : self.key().id()
}
return json.dumps(data)

View file

@ -18,6 +18,7 @@ class Message(db.Model):
'day': self.msgDate.day,
'hour': self.msgDate.hour,
'minute': self.msgDate.minute
}
},
'id' : self.key().id()
}
return json.dumps(data)

View file

@ -20,5 +20,6 @@ class Project(db.Model):
'logo_url' : self.logo_url,
'gitRepository' : self.gitRepository,
'membersId' : self.membersId,
'id' : self.key().id()
}
return json.dumps(data)

View file

@ -21,6 +21,7 @@ class Task(db.Model):
'day': self.dueDate.day
},
'isPersonal' : self.isPersonal,
'id' : self.key().id()
}
return json.dumps(data)

View file

@ -19,6 +19,7 @@ class TaskComponent(db.Model):
'type' : self.type,
'label' : self.label,
'isMandatory' : self.isMandatory,
'order' : self.order
'order' : self.order,
'id' : self.key().id()
}
return json.dumps(data)