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):
|
class Course(db.Model):
|
||||||
courseName = db.StringProperty(required=True)
|
courseName = db.StringProperty(required=True)
|
||||||
campusName = db.StringProperty(required=True)
|
campusName = db.StringProperty(required=True)
|
||||||
|
master_id = db.IntegerProperty(required=True)
|
||||||
projects = db.StringListProperty(required=True,default=[])
|
projects = db.StringListProperty(required=True,default=[])
|
||||||
startDate = db.DateProperty(required=True)
|
startDate = db.DateProperty(required=True)
|
||||||
endDate = db.DateProperty(required=True)
|
endDate = db.DateProperty(required=True)
|
||||||
|
@ -13,6 +14,7 @@ class Course(db.Model):
|
||||||
def to_JSON(self):
|
def to_JSON(self):
|
||||||
data = {'courseName' : self.courseName,
|
data = {'courseName' : self.courseName,
|
||||||
'campusName' : self.campusName,
|
'campusName' : self.campusName,
|
||||||
|
'master_id' : self.master_id,
|
||||||
'projects' : self.projects,
|
'projects' : self.projects,
|
||||||
'startDate' : {
|
'startDate' : {
|
||||||
'year': self.startDate.year,
|
'year': self.startDate.year,
|
||||||
|
|
|
@ -5,7 +5,7 @@ from google.appengine.ext import db
|
||||||
|
|
||||||
class Project(db.Model):
|
class Project(db.Model):
|
||||||
projectName = db.StringProperty(required=True)
|
projectName = db.StringProperty(required=True)
|
||||||
masterId = db.IntegerProperty(required=True)
|
master_id = db.IntegerProperty(required=True)
|
||||||
grade = db.IntegerProperty(required=True, default=0)
|
grade = db.IntegerProperty(required=True, default=0)
|
||||||
logo_url = db.StringProperty(required=False)
|
logo_url = db.StringProperty(required=False)
|
||||||
gitRepository = db.StringProperty(required=True)
|
gitRepository = db.StringProperty(required=True)
|
||||||
|
@ -13,7 +13,7 @@ class Project(db.Model):
|
||||||
|
|
||||||
def to_JSON(self):
|
def to_JSON(self):
|
||||||
data = {'projectName' : self.projectName,
|
data = {'projectName' : self.projectName,
|
||||||
'masterId' : self.masterId,
|
'master_id' : self.master_id,
|
||||||
'grade' : self.grade,
|
'grade' : self.grade,
|
||||||
'logo_url' : self.logo_url,
|
'logo_url' : self.logo_url,
|
||||||
'gitRepository' : self.gitRepository,
|
'gitRepository' : self.gitRepository,
|
||||||
|
|
Loading…
Reference in a new issue