I have a list of image names loaded with flask, which I am rendering to an html template, so that the page displays the image. The only way I can seem to alter the image list (ie. add an image to it) is to make a view which contains code to change the list, but in order to access the view you have to reload the whole page again. Is there any way I can alter the list with flask without having to reload the whole page?
Share
Jakob Bowyer is absolutely correct – use ajax:
Then in your template just hit the appropriate endpoint: