Closed sylvoslee closed 2 years ago
I tried your demo(multi_page_basics)on dash2.5 and can't access http://127.0.0.1:8050/dashboard
Hi @sylvoslee. Thanks for reporting. There is an issue with pages
in dash 2.5 for for anyone on Windows. There is a pull request to fix this - patch is coming soon.
@sylvoslee dash 2.5.1 has been released :confetti_ball:
another question, how to get the hash value of the url
You can use the hash prop of dcc.Location
Why can't pass hash value to layout function like query?
def layout(day=days[0], **other_unknown_query_strings):
return html.Div(
[
dcc.Dropdown(
id="dropdown",
options=[{"label": x, "value": x} for x in days],
value=day,
clearable=False,
),
dcc.Graph(id="bar-chart"),
]
)
Hi @sylvoslee
Converting from a the dash-labs
pages
plug-in to thepages
feature in dash 2.5 requires 3 steps:remove
import dash_labs as dl
or upgrade dash-labs to V1.1.0 There is a conflict between dash-labs versions less than 1.1.0 when running a pages app in dash 2.5change:
app = Dash(__name__, plugins=[dl.plugins.pages])
to:app = Dash(__name__, use_pages=True)
change:
dl.plugins.page_container
to:dash.page_container
Let me know how it goes! The new dash docs with the pages feature will be ready soon.