Projects - added master_id and changed some properties

This commit is contained in:
Aran Zaiger 2015-06-15 01:35:18 +03:00
parent 279d637b82
commit 7239d27da2

View file

@ -5,13 +5,15 @@ from google.appengine.ext import db
class Project(db.Model): class Project(db.Model):
projectName = db.StringProperty(required=True) projectName = db.StringProperty(required=True)
grade = db.IntegerProperty(required=True) masterId = db.IntegerProperty(required=True)
logo_url = db.StringProperty(required=True) grade = db.IntegerProperty(required=True, default=0)
logo_url = db.StringProperty(required=False)
gitRepository = db.StringProperty(required=True) gitRepository = db.StringProperty(required=True)
membersId = db.StringListProperty(required=True) membersId = db.StringListProperty(required=True)
def to_JSON(self): def to_JSON(self):
data = {'projectName' : self.projectName, data = {'projectName' : self.projectName,
'masterId' : self.masterId,
'grade' : self.grade, 'grade' : self.grade,
'logo_url' : self.logo_url, 'logo_url' : self.logo_url,
'gitRepository' : self.gitRepository, 'gitRepository' : self.gitRepository,