small syntax fix
This commit is contained in:
commit
cfb2dbc4cd
2 changed files with 7 additions and 5 deletions
|
@ -60,7 +60,7 @@ def getUserByToken(token):
|
||||||
403 - No User Found
|
403 - No User Found
|
||||||
"""
|
"""
|
||||||
query = User.all()
|
query = User.all()
|
||||||
query.filter("seToken = ", token)
|
query.filter("seToken =", token)
|
||||||
|
|
||||||
for u in query.run(limit=5):
|
for u in query.run(limit=5):
|
||||||
return Response(response=u.to_JSON(),
|
return Response(response=u.to_JSON(),
|
||||||
|
|
|
@ -5,15 +5,17 @@ from google.appengine.ext import db
|
||||||
|
|
||||||
class Task(db.Model):
|
class Task(db.Model):
|
||||||
title = db.StringProperty(required=True)
|
title = db.StringProperty(required=True)
|
||||||
description = db.StringProperty(required=True)
|
courseName = db.StringProperty(required=True)
|
||||||
|
description = db.StringProperty(required=True,default=" ")
|
||||||
dueDate = db.DateProperty(required=True)
|
dueDate = db.DateProperty(required=True)
|
||||||
isProject = db.BooleanProperty(required=True)
|
isProject = db.BooleanProperty(required=True)
|
||||||
isClose = db.BooleanProperty(required=True)
|
isClose = db.BooleanProperty(required=True, default=False)
|
||||||
isDone = db.BooleanProperty(required=True)
|
isDone = db.BooleanProperty(required=True, default=False)
|
||||||
taskGrade = db.IntegerProperty(required=True)
|
taskGrade = db.IntegerProperty(required=True, default=0)
|
||||||
|
|
||||||
def to_JSON(self):
|
def to_JSON(self):
|
||||||
data = {'title' : self.title,
|
data = {'title' : self.title,
|
||||||
|
'courseName' : self.course,
|
||||||
'description' : self.description,
|
'description' : self.description,
|
||||||
'dueDate' : self.dueDate,
|
'dueDate' : self.dueDate,
|
||||||
'isProject' : self.isProject,
|
'isProject' : self.isProject,
|
||||||
|
|
Loading…
Reference in a new issue