Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,13 @@ def render_page_content(pathname):
elif pathname == "/messages":
return html.P("Here are all your messages")
# If the user tries to reach a different page, return a 404 message
return dbc.Jumbotron(
return html.Div(
[
html.H1("404: Not found", className="text-danger"),
html.Hr(),
html.P(f"The pathname {pathname} was not recognised..."),
]
],
className="p-3 bg-light rounded-3",
)


Expand Down
5 changes: 3 additions & 2 deletions examples/python/templates/multi-page-apps/navbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,13 @@ def render_page_content(pathname):
elif pathname == "/page-2":
return html.P("Oh cool, this is page 2!")
# If the user tries to reach a different page, return a 404 message
return dbc.Jumbotron(
return html.Div(
[
html.H1("404: Not found", className="text-danger"),
html.Hr(),
html.P(f"The pathname {pathname} was not recognised..."),
]
],
className="p-3 bg-light rounded-3",
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,13 @@ def render_page_content(pathname):
elif pathname == "/page-2":
return html.P("Oh cool, this is page 2!")
# If the user tries to reach a different page, return a 404 message
return dbc.Jumbotron(
return html.Div(
[
html.H1("404: Not found", className="text-danger"),
html.Hr(),
html.P(f"The pathname {pathname} was not recognised..."),
]
],
className="p-3 bg-light rounded-3",
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,13 @@ def render_page_content(pathname):
elif pathname == "/page-2":
return html.P("Oh cool, this is page 2!")
# If the user tries to reach a different page, return a 404 message
return dbc.Jumbotron(
return html.Div(
[
html.H1("404: Not found", className="text-danger"),
html.Hr(),
html.P(f"The pathname {pathname} was not recognised..."),
]
],
className="p-3 bg-light rounded-3",
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,13 @@ def render_page_content(pathname):
elif pathname == "/page-2/2":
return html.P("No way! This is page 2.2!")
# If the user tries to reach a different page, return a 404 message
return dbc.Jumbotron(
return html.Div(
[
html.H1("404: Not found", className="text-danger"),
html.Hr(),
html.P(f"The pathname {pathname} was not recognised..."),
]
],
className="p-3 bg-light rounded-3",
)


Expand Down
5 changes: 3 additions & 2 deletions examples/python/templates/multi-page-apps/simple_sidebar.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,13 @@ def render_page_content(pathname):
elif pathname == "/page-2":
return html.P("Oh cool, this is page 2!")
# If the user tries to reach a different page, return a 404 message
return dbc.Jumbotron(
return html.Div(
[
html.H1("404: Not found", className="text-danger"),
html.Hr(),
html.P(f"The pathname {pathname} was not recognised..."),
]
],
className="p-3 bg-light rounded-3",
)


Expand Down