Good question! For now, I think the best answer is just embedding the app as an
iframe inside your templates.
If you or your company would like to sponsor a
dash-django package, please reach out.
Good to know. That’s doable, but as I mentioned I’d like to keep inside Python as much as possible when the project is mostly Python. As I move forward with my personal projects, I will likely have some thoughts (which may or may not include PRs; I’m still a newbie to Python) about smoother integration with the end goal of having Dash as a pluggable Django app. From where I’m looking at it, this seems like a marriage that has to happen at some point.
The thing that makes this less than ideal for me, as someone who deploys on Heroku, is that I believe I would need to spin up two apps with their own dynos; one for the Dash app, and one for the Flask app.
This was the same issue that I was having with incorporating Bokeh into a Flask app. The only way to have the interactive widgets was to spin up a Bokeh server on a separate Heroku dyno and then point to it from the Flask app.
Again - this was less than ideal.
So, I like that Dash gives me the opportunity to create a multi-page site that is all inclusive all on one dyno…
Though it means that I lose access to a ton of premade templates.
iframe solution forever than maintain a fork like that).
Does anyone have any thoughts on the matter?
I’ve made Dash’s front-end and component system completely modular and separate from Dash’s backend to allow for alternative Dash backends in either other languages or other servers. This opens up the possibility to implement an alternative Dash backend in something like Django. The backend just needs to parse the JSON HTTP responses and provide a nice
Before the community starts writing alternative backends, we should stabilize, spec out, and version this API. That way, the Dash front-end ("
dash-renderer": https://github.com/plotly/dash-renderer) can be versioned to be compatible with certain versions of this spec.
I’d like to wait for the dust to settle before locking these specs down and before officially supporting alternative backends. I hope that makes sense!
Again, if anyone or their company would like to expedite through sponsorship, please reach out.
Makes sense. In that case, I won’t rush to make anything substantial, but I might try to figure out how I feel a Dash integration should be used from the Django side.