python - How to call modal dialog from inside Flask function -


with bootstrap modal dialog's id="mymodal":

<div id="mymodal" class="modal fade" role="dialog"> ... </div> 

i can call clicking simple <a>. happens because <a>s data-target attribute linked modal dialog's id mymodal :

<a data-toggle="modal" data-target="#mymodal">click here</a> 

i wonder if there way call modal dialog id inside of flask python function.

@app.route('/call_modal', methods=['get', 'post']) def call_modal():     # ... call modal dialog id? 

you can use modal plugin make work, such remodal. bootstrap modal, every modal has id, can call anchor, this: //example.com#mymodal.

in view.py:

@app.route('/call_modal', methods=['get', 'post']) def call_modal():     redirect(url_for('index') + '#mymodal') 

Comments

Popular posts from this blog

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

jsf - "PropertyNotWritableException: Illegal Syntax for Set Operation" error when setting value in bean -

arrays - Algorithm to find ideal starting spot in a circle -