-var name change in campus
-default value for Campus properties
This commit is contained in:
parent
e1b6f49686
commit
dcb83987f8
2 changed files with 4 additions and 4 deletions
|
@ -11,12 +11,12 @@ class Campus(db.Model):
|
||||||
master_user_id = db.IntegerProperty(required=True)
|
master_user_id = db.IntegerProperty(required=True)
|
||||||
|
|
||||||
def to_JSON(self):
|
def to_JSON(self):
|
||||||
dick = {'title': self.title,
|
data = {'title': self.title,
|
||||||
'email_ending': self.email_ending,
|
'email_ending': self.email_ending,
|
||||||
'master_user_id': self.master_user_id,
|
'master_user_id': self.master_user_id,
|
||||||
'avatar_url': self.avatar_url
|
'avatar_url': self.avatar_url
|
||||||
}
|
}
|
||||||
return json.dumps(dick)
|
return json.dumps(data)
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -12,8 +12,8 @@ class User(db.Model):
|
||||||
seToken = db.StringProperty(required=True)
|
seToken = db.StringProperty(required=True)
|
||||||
avatar_url = db.StringProperty(required=True)
|
avatar_url = db.StringProperty(required=True)
|
||||||
isFirstLogin = db.BooleanProperty(default=True)
|
isFirstLogin = db.BooleanProperty(default=True)
|
||||||
campuses_id_list = db.StringListProperty()
|
campuses_id_list = db.StringListProperty(default=[])
|
||||||
classes_id_list = db.StringListProperty()
|
classes_id_list = db.StringListProperty(default=[])
|
||||||
|
|
||||||
def to_JSON(self):
|
def to_JSON(self):
|
||||||
data = {'username' : self.username,
|
data = {'username' : self.username,
|
||||||
|
|
Loading…
Reference in a new issue