Example #1
0
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)
Example #2
0
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)
Example #3
0
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)
Example #4
0
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)