Esempio n. 1
0
def query():
    res = execute_query(request.args)
    page = request.args.get(get_page_parameter(), type=int, default=1)
    pagination = Pagination(page=page,
                            found=len(res),
                            total=get_total_papers(),
                            record_name='papers',
                            format_total=True,
                            format_number=True,
                            search=True,
                            bs_version=4)
    res = list(res)[(int(page) * 10 - 10):(int(page) * 10)]
    return render_template('index.html',
                           data=res,
                           properties=get_properties(),
                           query=request.args.get('q'),
                           pagination=pagination)
Esempio n. 2
0
def get_property():
    return jsonify(get_properties())
Esempio n. 3
0
def index():
    properties = get_properties()
    return render_template('index.html',
                           properties=properties,
                           data=None,
                           query=None)