Package: dash-dashboards
Dash DasboardsInstallationpipinstalldash_dashboardsUsageThis package includes command line tooldash-adminwhich helps you create project with multiple Dash dashboards. Some usefull commands are:startprojectcreate a new project templatestartdashcreate a new dashboard templateHere is an example of usage. First create a new project calledmy_dash_app:dash-adminstartproject-nmy_dash_appThis command will generate project directory and inside:settings.pycontains configuration for your applicationrunserver.pycontains CLI command for running the app with parameters passed from a command linedashboardsdirectory where you can put implementation of dashboardsNow enter directorymy_dash_appand run command:dash-adminstartdash-npage1This command will create a new dashboard template which should contain:dashboard layoutdashboard callbacks in case when you have interactive elementsWhen you have multiple dashboards, it is wise to use a unique prefix for HTMLidattributes in each page. This way, you will ensure that only appropriate callbacks are triggered when you interact with the app.You can organize your dashboards however you want. You can put layout in one file and callbacks into another. The only important thing is configuration in thesettings.py. You need to configure two things:include layout into applicationmenuregister callbacksFor example, after runningstartdashcommand, yoursettings.pycode should be modified to something like this:fromdash_dashboards.appimportDashboardApp,MenuItemfromdashboards.page1importappaspage1_appapp=DashboardApp(title="My Dash App",menu=[MenuItem("Page1",page1_app.layout,"/page-1/")],)app.add_callbacks(page1_app.callbacks)Run the following command to start the app in debug mode:pythonrunserver.py--debugUpgrade to a newer versionAfter each upgrade of thedash_dashboardspackage, it is recommended to run command:dash-admingenerate-assetsImportant:this command will overwrite generated assets. If you want to add your own assets or custom css styles, do not modify generated files (for example -style.css).Custom appIf you want to use custom navigation or custom layout for content, you can subclassDashboardApp.Custom cssCreate your css file(s) inassetsdirectory, for exampleassets/custom-style.css. Then modifysettings.pyand addexternal_stylesheetsparameter to the DashboardApp initializer. For example:app=DashboardApp(title="My Dash App",menu=[MenuItem("Page1",page1_app.layout,"/page-1/")],external_stylesheets=["assets/custom-style.css"],)Custom colorsIn your custom css file overwrite values for::root{--app-primary:#A4161A;--app-primary-light:#B1A7A6;--app-primary-dark:#660708;--app-input-item-bg:#FDF6F7;--app-text-color:var(--bs-body-color);--app-box-shadow:rgba(211,211,211,0.3);}Not-scrollable contentTo disable main content scroll, set in your custom css file:#content{overflow-x:hidden;height:100vh;}TaggingInstall bump2version tool:pipinstallbump2versionCreate new tag:# add --dry-run to testbump2version--verbosepatchPush new commit and tag:git push && git push --tagsChanges should be added to theCHANGELOG.mdunder***unrealeased***beforehand!DevelopmentTo install everything including test dependencies run:pipinstall-e".[tests]"Run all checks and tests with:tox