webapp
This commit is contained in:
parent
71229491f7
commit
768418258e
1 changed files with 6 additions and 12 deletions
18
webapp.py
18
webapp.py
|
@ -30,12 +30,6 @@ app = Flask(__name__)
|
|||
def get_form():
|
||||
return render_template("landing_form.html")
|
||||
|
||||
@app.route("/result", methods=['POST'])
|
||||
def show_result():
|
||||
pto = escape(request.form['pto'])
|
||||
result = parse_response(query_axione_pto(cfg, pto))
|
||||
return render_template("result.html", pto=pto, result=result)
|
||||
|
||||
@app.route("/addresses/communes", methods=['GET'])
|
||||
def get_communes():
|
||||
to_search=request.args.get('s')
|
||||
|
@ -58,15 +52,15 @@ def get_fantoir_voies(codeInsee):
|
|||
|
||||
@app.route("/test/address", methods=['POST'])
|
||||
def test_address():
|
||||
print(request.form)
|
||||
# pto = escape(request.form['pto'])
|
||||
commune = escape(request.form['commune'])
|
||||
numeroVoie = escape(request.form['numeroVoie'])
|
||||
voie = escape(request.form['voie'])
|
||||
# result = parse_response(query_axione_pto(cfg, pto))
|
||||
return json.dumps({'success':True}), 200, {'ContentType':'application/json'}
|
||||
|
||||
|
||||
@app.route("/test/pto", methods=['POST'])
|
||||
def test_pto():
|
||||
print(request.form)
|
||||
# pto = escape(request.form['pto'])
|
||||
# result = parse_response(query_axione_pto(cfg, pto))
|
||||
return json.dumps({'success':True}), 200, {'ContentType':'application/json'}
|
||||
pto = escape(request.form['pto'])
|
||||
result = parse_response(query_axione_pto(cfg, pto))
|
||||
return render_template("result.html", pto=pto, result=result)
|
||||
|
|
Loading…
Reference in a new issue