예제 #1
0
 def convert(self,field, value):
     if field == 'questions':
         qlist = []
         for v in value:
             key = db.Key(encoded = v)
             qlist.append(key)
         return qlist
     
     return RESTHandlerClass.convert(self, field, value)
예제 #2
0
 def __init__(self, request=None, response=None):
     RESTHandlerClass.__init__(self, request, response)
     self.ModelClass = QuestionList
     self.required = ['name']
     self.parent_required = True
     self.cache_key = 'question_list'
예제 #3
0
 def __init__(self, request=None, response=None):
     RESTHandlerClass.__init__(self, request, response)
     self.ModelClass = Course
     self.required = ["name"]
     self.parent_required = True
     self.cache_key = "course"