Example #1
0
 def to_json(self, limit=0):
     try:
         limit = int(limit)
     except (TypeError, ValueError) as e:
         logger.warning(f'Invalid limit value, falling back to 0, {e}')
         limit = 0
     query = self.query
     if limit and limit > 0:
         query = query.limit(limit)
     result = to_json(bs for bs in query)
     return result
Example #2
0
def index():

    list = Team_1.select()

    return to_json(list)
Example #3
0
def index():
    return to_json(Student.select())
def index():
    return to_json(Student.select())
Example #5
0
def index():
    return to_json(Business.select())
Example #6
0
def hello():
        # admin = Role(name='Saint3')
        # admin.add_permission('User', 'show', 2)

    return to_json(Role.select())
Example #7
0
def index():
    return to_json(Persona.select())