Пример #1
0
 def __init__(self, modelCls, toJson, routeParams={}, recordValueProvider=EvenIfNone(RecordValueProvider()), decorators=[]):
     """ Initialize the Create Controller """
     JSONController.__init__(self, decorators=decorators)
     self.modelCls = modelCls
     self.toJson = toJson
     self.routeParams = routeParams
     self.recordValueProvider = recordValueProvider
Пример #2
0
 def __init__(self, formInfo):
     """ Initialize the Controller """
     self.formInfo = formInfo
     JSONController.__init__(
         self, decorators=[auth.requires_auth, requires_admin])
Пример #3
0
 def __init__(self, formInfo):
     """ Initialize the List Controller """
     self.formInfo = formInfo
     JSONController.__init__(self, decorators=[auth.requires_auth, requires_admin])
Пример #4
0
 def __init__(self, modelCls, toJson, decorators=[]):
     """ Initialize the Record Controller """
     JSONController.__init__(self, decorators=decorators)
     self.modelCls = modelCls
     self.toJson = toJson
Пример #5
0
 def __init__(self, modelCls, toJson, routeParams={}, decorators=[]):
     """ Initialize the List Controller """
     JSONController.__init__(self, decorators=decorators)
     self.modelCls = modelCls
     self.toJson = toJson
     self.routeParams = routeParams
Пример #6
0
 def __init__(self, modelCls, decorators=[]):
     """ Initialize the Delete Controller """
     JSONController.__init__(self, decorators=decorators)
     self.modelCls = modelCls