S
S
ssssergey2015-06-23 14:08:58
HTML
ssssergey, 2015-06-23 14:08:58

How to display data from the database in Modal (Bootstrap)?

Used by Flask and Bootstrap.
Is it necessary that when clicking on a link on the page, a Modal is displayed with information that was previously requested from the database (that is, from a Python function)?
By what means is it possible to implement a request from a page and receive data from a python script? Interested in the section between the Python function and HTML?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
entermix, 2015-06-23
@entermix

Insert content when generating the main page, or AJAX request to your server when opening a modal window

F
Fireproof Cockroach, 2015-06-23
@uonick

  • When opening a modal window, draw loading on the form (so that the user knows that data is being loaded).
  • Then send a request to your backend with parameters.
    There are several options for sending data.
    You can use $('#div').load() or $.post or $.ajax

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question