コード例 #1
0
ファイル: service.py プロジェクト: codilime/acid
 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
コード例 #2
0
ファイル: vista.py プロジェクト: piperod/Practica
def index():

    list = Team_1.select()

    return to_json(list)
コード例 #3
0
ファイル: example.py プロジェクト: clach04/flask-ponywhoosh
def index():
    return to_json(Student.select())
コード例 #4
0
def index():
    return to_json(Student.select())
コード例 #5
0
ファイル: example.py プロジェクト: ayushmandey97/athena
def index():
    return to_json(Business.select())
コード例 #6
0
def hello():
        # admin = Role(name='Saint3')
        # admin.add_permission('User', 'show', 2)

    return to_json(Role.select())
コード例 #7
0
ファイル: run.py プロジェクト: piperod/Practica
def index():
    return to_json(Persona.select())