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

php - How to display all orders for a single product showing the most recent first? Woocommerce -

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

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -