def search(): if request.method == 'GET': data=prog.get_bd(request.args.get('budget','0')); if (data==[]): return render_template('no_results.html') else: return render_template('results.html',data=data)
def search(): if request.method == 'GET': data = prog.get_bd(request.args.get('budget', '0'), request.args.get('lieu', ''), request.args.get('date_aller', ''), request.args.get('date_retour', '')) if (data == []): return render_template('no_results.html') else: return render_template('results.html', liste_resultats=data)
def search(): if request.method == 'GET': data = prog.get_bd(request.args.get('budget'), request.args.get('lieu'), request.args.get('date_aller'), request.args.get('date_retour')) try: return render_template('results.html', liste=data, logged=session['logged']) except: return render_template('results.html', liste=data, logged=False)
def search(): if request.method == 'GET': data=[] data=prog.get_bd(request.args.get('budget'), request.args.get('lieu'), request.args.get('date_aller'), request.args.get('date_retour')); try : session['last_search']=[request.args.get('budget'),request.args.get('lieu'),request.args.get('date_aller'), request.args.get('date_retour'),"NULL", "NULL", "NULL"] return render_template('results.html',liste=data[0], message= data[1], logged=session['logged']) except: return render_template('results.html',liste=data[0], logged=False)