Plotly Dash is great dashboard tools which allow programmer to easily create interactive dashboard with endless possibilities but it lack of general functionality such as web-authentication and user permission.
Frappe web framework is also a great web framework with come with alot of functionality.
Integrate Plotly Dash with Frappe web framework will result in great dashboard tools with web-authentication, user permission, ability to easily performs CRUD operation and also the most important thing ERPNext.
Access Frappe data from dash environment.
Dashboard template using CoreUI admin template.
Authentication from Frappe web framework.
Dashboard permission using user roles from Frappe.
It works by passing request from Frappe application to Dash application only if request url path start with /dash
.
Then we embedded Dash page with CoreUI template into Frappe page using iFrame.
Dash Integration app is design to use along with Dash Dashboard app.
bench get-app dash_integration https://github.com/pipech/frappe-plotly-dash.git
bench get-app dash_dashboard https://github.com/pipech/frappe-plotly-dash-dashboard.git
dash_dashboard/dash_dashboard
folderdash_dashboard/router.py
file by adding route into dashboard_route.route_wrapper
functiondash_dashboard/router.py
file by adding callback into dashboard_callback.callback_wrapper
functionDash Dashboard
DocType, then add a new doc with matching name to dashboard_route
Change supervisor config
/etc/supervisor/conf.d/frappe-bench.conf
production_setup/conf/frappe-docker-conf/supervisor.conf
From
command=/home/frappe/bench/env/bin/gunicorn -b 0.0.0.0:8000 -w 4 -t 120 frappe.app:application --preload
To
command=/home/frappe/bench/env/bin/gunicorn -b 0.0.0.0:8000 -w 4 -t 120 dash_integration.app:application --preload
bench execute dash_integration.app.serve
This repository has been released under the MIT License.