html - Python Flask Get Data Attribute From Form -


hopefully there simple answer problem. want data post in flask not standard textfield value. trick want try , find solution without using javascript, im attempting use python.

this not specific example instead simplified one.

i want value of "data-status"

<form action="/myurl/" method="post">     <div data-status="mydatahere" class="classname"></div> </form> 

python

@app.route('/myurl/', methods=['post']) def myurl():     #python 'data-status' value here. 

thanks can provide answer.

you can't.

if you're reason unable change html, suggest make on submit event.

take @ other question: how add additional fields form before submit?


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -