I have a form like this
<form method="GET" action="{{ url_for('model3') }}">
<div> Choose a Model:
<select class="form-select" aria-label="Default select example" name="stage">
<option value="Post Flowering" {% if thing=='Post Flowering' %} selected {% endif %}>Post Flowering</option>
<option value="Filling" {% if thing=='Filling' %} selected {% endif %}>Filling</option>
<option value="Filling Ripening" {% if thing=='Filling Ripening' %} selected {% endif %} >Filling-Ripening</option>
<option value="Ripening" {% if thing=='Ripening' %} selected {% endif %}>Ripening</option>
</select>
<input type="submit" value="Submit">
</div>
then I have route like this
@app.route('/WheatDetect', methods=['POST', 'GET'])
def model3():
stage = request.args.get('stage')
print("stage in get-->",stage)
if request.method == 'POST':
print("stage in post-->", stage)
the problem is the first print can get what I have from select option while the 2nd print always show none... but I need that value to process my data, but how???