Example of Asynchronous page processing in Flask

Dhanu

New Member
I am dealing with an application which is using a lot of graphics (the library Raphael and graphdracula). Basically, the application is drawing different graphs. Let's say that we have 3 pages which are drawing graphs:[*]graph1[*]graph2[*]graph3Let's say we have the following URL: \[code\]www.someurl.com/graph1\[/code\]Now, this URL is going to load the page and the drawing algorithm for graph1. The way my application works now is: if I want to change the layout (say, to graph2), I will have to reload a whole page:\[code\]www.someurl.com/graph2\[/code\]What I want to do is: to make this as a Single Page Application (SPA). When we load the application, I want all the graphs to be loaded, but only one to be visible (I guess this is the way to do it). When I click a button, just to load the stuff I need, not the whole page. Something like, when we open the application's page about graphs, to be:\[code\]www.someurl.com/graph#1 -> for the first graphwww.someurl.com/graph#2 -> for the second graphwww.someurl.com/graph#3 -> for the third graph\[/code\]I want to this asynchronous. I tried to find something for Flask, but without sucess. Can someone please point me into the right direction how should I do this?Thanks in advance!
 
Back
Top