Ann,
Thanks so much for the help. I checked the home.py and it does have that:
import dash
from dash import html
dash.register_page(
__name__,
path='/',
name='Capacity Model homepage',
description='Welcome to my app',
order=0,
redirect_from=['/old-home-page', '/v2'],
extra_template_stuff='yup'
)
layout = html.Div([
html.H1('Homepage for the app'),
html.H2('Notes to be populated soon')
])
The JSON dump looks about right:
{
"pages.home": {
"module": "pages.home",
"supplied_path": "/",
"path": "/",
"supplied_name": "Capacity Model homepage",
"name": "Capacity Model homepage",
"supplied_title": null,
"title": "Capacity Model homepage",
"supplied_description": "Welcome to my app",
"description": "Welcome to my app",
"supplied_order": 0,
"supplied_layout": null,
"extra_template_stuff": "yup",
"image": "home.jpeg",
"supplied_image": null,
"redirect_from": [
"/old-home-page",
"/v2"
],
"order": 0
},
"pages.not_found_404": {
"module": "pages.not_found_404",
"supplied_path": "/404",
"path": "/404",
"supplied_name": null,
"name": "Not found 404",
"supplied_title": null,
"title": "Not found 404",
"supplied_description": null,
"description": "Not found 404",
"supplied_order": null,
"supplied_layout": null,
"image": "app.jpeg",
"supplied_image": null,
"redirect_from": null
},
"pages.production_tracker": {
"module": "pages.production_tracker",
"supplied_path": "/production-tracker",
"path": "/production-tracker",
"supplied_name": "Production Tracker",
"name": "Production Tracker",
"supplied_title": "Production Tracker",
"title": "Production Tracker",
"supplied_description": "This is the Production Tracker",
"description": "This is the Production Tracker",
"supplied_order": 2,
"supplied_layout": null,
"image": "birds.jpeg",
"supplied_image": "birds.jpeg",
"redirect_from": null
},
"pages.rvp_view": {
"module": "pages.rvp_view",
"supplied_path": "/regional",
"path": "/regional",
"supplied_name": "Regional View",
"name": "Regional View",
"supplied_title": "Regional View",
"title": "Regional View",
"supplied_description": "This is the Regional view",
"description": "This is the Regional view",
"supplied_order": 1,
"supplied_layout": null,
"image": "birds.jpeg",
"supplied_image": "birds.jpeg",
"redirect_from": null
}
}
Dash is running on http://localhost:8010/
* Serving Flask app 'app' (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: on
@AnnMarieW that is a great question about the dropdown! That persistence actually works! It stays in between pages and works.
dcc.Dropdown(
id='auction_dropdown',
options=[{'label': auction, 'value': auction}
for auction in ['AAAW', 'FAAO', 'SVAA', 'MAA', 'BWAE', 'GCAA', 'PXAA', 'DFWA', 'BCAA', 'GOAA']],
value=['AAAW', 'FAAO', 'SVAA', 'MAA', 'BWAE', 'GCAA', 'PXAA', 'DFWA', 'BCAA', 'GOAA'], # Default value to show
persistence=True,
multi=True,
searchable=False
)
The above dropdown code is on two different pages with the same id. If I update it and navigate to the any page it persists. Maybe the persistence is an issue with the datatable? Thanks so much for your help with persistence and with looking into why the dash_labs doesnât work (have to use pages_plugin.py).