flexx icon indicating copy to clipboard operation
flexx copied to clipboard

Best way to implement flexx in flask?

Open ibarragerman opened this issue 5 years ago • 5 comments

Hello, I would like develop a drag and drop module (ussing flexx) in a webapp written using flask. I tried to use the server side approach published in howtos directory (serve_with_flask.py) but I coudnt merge with flask in an ambient with headers, footers, ccs normally used in flask with render_templates. How is the best way to implement flexx in a flask implementation. Regards.

ibarragerman avatar May 17 '19 01:05 ibarragerman

I am not familiar with Flask, but I think you're asking to embed a Flexx front-end app into a flask-specific template? Can you explain a bit more what this should look like?

almarklein avatar May 17 '19 10:05 almarklein

Hi Almarklein. That is exactly that I would like to do. I need make some interactive form with buttons and graphs. For engineering calculation and embedded it in a webapp.

ibarragerman avatar May 17 '19 14:05 ibarragerman

Flexx is able to embed itself in a larger web app, but the App.dump() method does not take this option into account yet. So for the time being, you'd either have to make Flexx the full page, or perhaps use an iframe.

almarklein avatar May 20 '19 09:05 almarklein

thanks!

ibarragerman avatar Jul 25 '19 17:07 ibarragerman

Here is another way using a reverse proxy implementation in Flask. You can use this solution if you implemented some PyWidget for server side tasks: https://github.com/ceprio/flask_reverse_proxy_for_flexx

ceprio avatar Nov 14 '20 15:11 ceprio