models - added master_id
This commit is contained in:
parent
644e362818
commit
379ede2617
2 changed files with 4 additions and 2 deletions
|
@ -6,6 +6,7 @@ from google.appengine.ext import db
|
|||
class Course(db.Model):
|
||||
courseName = db.StringProperty(required=True)
|
||||
campusName = db.StringProperty(required=True)
|
||||
master_id = db.IntegerProperty(required=True)
|
||||
projects = db.StringListProperty(required=True,default=[])
|
||||
startDate = db.DateProperty(required=True)
|
||||
endDate = db.DateProperty(required=True)
|
||||
|
@ -13,6 +14,7 @@ class Course(db.Model):
|
|||
def to_JSON(self):
|
||||
data = {'courseName' : self.courseName,
|
||||
'campusName' : self.campusName,
|
||||
'master_id' : self.master_id,
|
||||
'projects' : self.projects,
|
||||
'startDate' : {
|
||||
'year': self.startDate.year,
|
||||
|
|
|
@ -5,7 +5,7 @@ from google.appengine.ext import db
|
|||
|
||||
class Project(db.Model):
|
||||
projectName = db.StringProperty(required=True)
|
||||
masterId = db.IntegerProperty(required=True)
|
||||
master_id = db.IntegerProperty(required=True)
|
||||
grade = db.IntegerProperty(required=True, default=0)
|
||||
logo_url = db.StringProperty(required=False)
|
||||
gitRepository = db.StringProperty(required=True)
|
||||
|
@ -13,7 +13,7 @@ class Project(db.Model):
|
|||
|
||||
def to_JSON(self):
|
||||
data = {'projectName' : self.projectName,
|
||||
'masterId' : self.masterId,
|
||||
'master_id' : self.master_id,
|
||||
'grade' : self.grade,
|
||||
'logo_url' : self.logo_url,
|
||||
'gitRepository' : self.gitRepository,
|
||||
|
|
Loading…
Reference in a new issue