dash icon indicating copy to clipboard operation
dash copied to clipboard

Blueprint

Open stsouko opened this issue 9 years ago • 7 comments

Hello!

Is it possible to use Blueprint for instancing Dash app? not flask app itself.

this give easy integration to existing apps.

stsouko avatar Jun 21 '17 19:06 stsouko

Good question. I haven't looked into Blueprints recently so I'm not too familiar with how this would work or what it would provide. I'd appreciate some community guidance here.

Are you just looking to use Dash in an existing Flask app? One way to do this right now would be to just run Dash separately from the your other Flask instances and embed the Dash apps as an Iframe in your templates.

chriddyp avatar Jun 21 '17 19:06 chriddyp

As far as I understood after reading the user guide, one would need to write a new Dash (Flask) application for each plot instance, since the layout of the page is also bound to the application object.

It seems there is no support for routing, meaning I can't have different plot instances within the same application, each with it's own layout, listening to a specific route. Something like:

route rendered plot
myapp.com/plots/barchart barchart
myapp.com/plots/scatterplot scatterplot
... ...

This way, one could even use the contents of the HTTP request, e.g. to specify the data to be plotted.

The concept of flask blueprints might allow to do this, as each blueprint could contain a dash application, and then every blueprint would be registered under a specific route in the main flask application. However, I'm afraid that due to the fact, that every Dash instance creates a full Flask application, blueprints can't be used in this situation. I'm not a blueprint expert though, so I would appreciate if someone with more knowledge could explain this.

@chriddyp please correct me if I misunderstood something here.

DavidUnzue avatar Jun 23 '17 13:06 DavidUnzue

@chriddyp is this correct — there's no way to have more than one chart in the single Flask app right now?

yunake avatar Jul 27 '17 01:07 yunake

Would be happy to know if anyone got this working (blueprint or multiple charts in one flask application)

nvgoldin avatar Mar 19 '18 07:03 nvgoldin

Hello everyone, I'm wondering that how to get blueprint instance in dash app in init dash plot object? thank you

vanchung1995 avatar Nov 20 '18 10:11 vanchung1995

hi i have the same issue in creating how to get blueprint instance in dash app in init dash plot object?

kalimuthu123 avatar Apr 11 '21 13:04 kalimuthu123

Hi - this issue has been sitting for a while, and we're not planning to tackle it, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson

gvwilson avatar Jun 03 '24 13:06 gvwilson