I am trying to design a web page with web-framework flask. This is the basic representation of the problem I faced.
app.py
app = Flask(__name__)
@app.route('/')
def home():
return render_template('main.html', value="Utkarsh Prakash")
@app.route('/approved', methods = ['POST', 'GET'])
def approved():
return "Done"
if __name__ == '__main__':
app.run(debug = False, threaded=False)
main.html
<HTML>
<BODY>
<FORM action = "/approved" method = "POST">
{{value}}
<INPUT type="text" name="text" value={{value}}>
<INPUT type = "Submit">
</FORM>
</BODY>
</HTML>
I just want the value which I am rendering from my flask code to be passed as predefined value of my text input file. Although {{value}} is containing both the words "Utkarsh Prakash", my input text field only contains one word, i.e., "Utkarsh".
How can I display both the words in the input text area?