removed project list from course and added course to project
This commit is contained in:
parent
f5cac61856
commit
ab4cdab12d
2 changed files with 4 additions and 2 deletions
|
@ -7,7 +7,7 @@ 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=[])
|
||||
# projects = db.StringListProperty(required=True,default=[])
|
||||
startDate = db.DateProperty(required=True)
|
||||
endDate = db.DateProperty(required=True)
|
||||
|
||||
|
@ -15,7 +15,7 @@ class Course(db.Model):
|
|||
data = {'courseName' : self.courseName,
|
||||
'campusName' : self.campusName,
|
||||
'master_id' : self.master_id,
|
||||
'projects' : self.projects,
|
||||
# 'projects' : self.projects,
|
||||
'startDate' : {
|
||||
'year': self.startDate.year,
|
||||
'month': self.startDate.month,
|
||||
|
|
|
@ -5,6 +5,7 @@ from google.appengine.ext import db
|
|||
|
||||
class Project(db.Model):
|
||||
projectName = db.StringProperty(required=True)
|
||||
courseName = db.StringProperty(required=True)
|
||||
master_id = db.IntegerProperty(required=True)
|
||||
grade = db.IntegerProperty(required=True, default=0)
|
||||
logo_url = db.StringProperty(required=False)
|
||||
|
@ -13,6 +14,7 @@ class Project(db.Model):
|
|||
|
||||
def to_JSON(self):
|
||||
data = {'projectName' : self.projectName,
|
||||
'courseName' : self.courseName,
|
||||
'master_id' : self.master_id,
|
||||
'grade' : self.grade,
|
||||
'logo_url' : self.logo_url,
|
||||
|
|
Loading…
Reference in a new issue