I'm hoping to avoid using JS too much.
anyway, I now have a few towns added, just need to find a way of not having to put them all in manually
I guess a database is possibly the next move?
so far I have this in flask_app.py:
@app.route('/input', methods=['POST'])
def input2():
j = request.form['texty3']
k = j
l = '96 miles'
m = '87 miles'
n = '331 miles'
o = '287 miles'
p = '162 miles'
q = '133 miles'
if k == 'Bath':
return render_template('input.html', k=k, l=l)
elif k == 'Cheltenham':
return render_template('input.html', k=k, m=m)
elif k == 'Edinburgh':
return render_template('input.html', k=k, n=n)
elif k == 'Dublin':
return render_template('input.html', k=k, o=o)
elif k == 'Manchester':
return render_template('input.html', k=k, p=p)
elif k == 'Taunton':
return render_template('input.html', k=k, q=q)
else:
return render_template('error.html')