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)
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)
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)
def generate_live_listing(): try: results = inventory_live_data.get_db_lists() except ih.ConnectOrAuthFail: return "{}" return jsonify(results)