Esempio n. 1
0
def rotation_changes() -> str:
    query = request.args.get('fq')
    if query is None:
        query = ''
    view = RotationChanges(
        *oracle.pd_rotation_changes(get_season_id()), cs.playability(), query=query)
    return view.page()
Esempio n. 2
0
def rotation_changes_files(changes_type: str) -> Response:
    changes = oracle.pd_rotation_changes(
        get_season_id())[0 if changes_type == 'new' else 1]
    s = '\n'.join('4 {name}'.format(name=c.name) for c in changes)
    return make_response(
        s, 200, {
            'Content-type': 'text/plain; charset=utf-8',
            'Content-Disposition': f'attachment; filename={changes_type}.txt'
        })
Esempio n. 3
0
def rotation_changes() -> str:
    view = RotationChanges(*oracle.pd_rotation_changes(get_season_id()),
                           cs.playability())
    return view.page()