Velpus Captiosus
Well-Known Coder
I have this function in Flask:
however after the
Python:
@app.route('/<usrname>?<app>',methods=['POST','GET'])
def mainW(usrname:str,app:str):
if request.method=='POST':
action = request.form.get('action')
if action == 'email':
return redirect(url_for('mainW',usrname=usrname,app='email'))
else:
return '1'
else:
return render_template('main.html')
however after the
email
action takes place obviously the usrname
value is lost. How can I store the value of usrname?