コード例 #1
0
ファイル: inventory_app.py プロジェクト: LMFDB/lmfdb
def generate_live_listing():
    try:
        results = inventory_live_data.get_db_lists()
    except ih.ConnectOrAuthFail:
        linv.log_dest.error("Connection failure, returning no data")
        return "{}"
    return jsonify(results)
コード例 #2
0
ファイル: inventory_app.py プロジェクト: sanni85/lmfdb
def generate_live_listing():
    try:
        results = inventory_live_data.get_db_lists()
    except ih.ConnectOrAuthFail:
        linv.log_dest.error("Connection failure, returning no data")
        return "{}"
    return jsonify(results)
コード例 #3
0
ファイル: inventory_app.py プロジェクト: LMFDB/lmfdb
def show_rescrape_page():

    bread=[['⌂', url_for('index')],[url_pref.strip('/'), url_for('inventory_app.show_edit_root')], ['rescrape', url_for('inventory_app.show_rescrape_page')]]
    try:
        listing = inventory_live_data.get_db_lists()
    except ih.ConnectOrAuthFail as e:
        linv.log_dest.error("Returning auth fail page")
        new_url = str(request.referrer)
        mess = "Connect or Auth failure: ("+str(dt.now().strftime('%d/%m/%y %H:%M:%S'))+") "+e.message
        return render_template('edit_authfail.html', new_url=new_url, message = mess, submit_contact=linv.email_contact, bread=bread)

    return render_template('scrape_main.html', listing=listing, bread=bread)
コード例 #4
0
ファイル: inventory_app.py プロジェクト: ngonhi/lmfdb-1
def show_rescrape_page():

    bread = [['⌂', url_for('index')],
             [url_pref.strip('/'),
              url_for('inventory_app.show_edit_root')],
             ['rescrape',
              url_for('inventory_app.show_rescrape_page')]]
    try:
        listing = inventory_live_data.get_db_lists()
    except ih.ConnectOrAuthFail as e:
        new_url = str(request.referrer)
        mess = "Connect or Auth failure: (" + str(
            dt.now().strftime('%d/%m/%y %H:%M:%S')) + ") " + e.message
        return render_template('edit_authfail.html',
                               new_url=new_url,
                               message=mess,
                               submit_contact=linv.email_contact,
                               bread=bread)

    return render_template('scrape_main.html', listing=listing, bread=bread)
コード例 #5
0
ファイル: inventory_app.py プロジェクト: ngonhi/lmfdb-1
def generate_live_listing():
    try:
        results = inventory_live_data.get_db_lists()
    except ih.ConnectOrAuthFail:
        return "{}"
    return jsonify(results)