annmariew / dash-multi-page-app-demos Goto Github PK
View Code? Open in Web Editor NEWMinimal examples of multi-page apps using Dash Pages
Minimal examples of multi-page apps using Dash Pages
multi_page_nested_folders/app.py uses a direction keyword argument when calling dmc.Group. For me this results in the below error. Removing the argument defaults to all links in a group being in one row. Python 3.11, dmc 0.12.1
Traceback (most recent call last):
File "/dash-multi-page-app-demos/multi_page_nested_folders/app.py", line 38, in
dmc.Group(
File "/dash-multi-page-app-demos/.venv/lib/python3.11/site-packages/dash/development/base_component.py", line 420, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/dash-multi-page-app-demos/.venv/lib/python3.11/site-packages/dash_mantine_components/Group.py", line 65, in init
super(Group, self).init(children=children, **args)
File "/dash-multi-page-app-demos/.venv/lib/python3.11/site-packages/dash/development/base_component.py", line 138, in init
raise TypeError(
TypeError: The dash_mantine_components.Group
component (version 0.12.1) received an unexpected keyword argument: direction
Allowed arguments: align, bg, bgp, bgr, bgsz, bottom, c, children, className, classNames, display, ff, fs, fw, fz, grow, h, id, inset, left, lh, lts, m, mah, maw, mb, mih, miw, ml, mr, mt, mx, my, noWrap, opacity, p, pb, pl, pos, position, pr, pt, px, py, right, spacing, style, styles, sx, ta, td, top, tt, unstyled, w
Doing more of a deep dive into the code as I'm currently working on a cache problem. On pip install -r requirements.txt
small issue where dill=0.3.5.1
isn't a valid operator needed to be dill==0.3.5.1
Is there a better way to make sure all examples actually run out of the box?
...\dash-multi-page-app-demos>python multi_page_cache_background_callback/app.py
Traceback (most recent call last):
File "multi_page_cache_background_callback/app.py", line 39, in <module>
import diskcache
ModuleNotFoundError: No module named 'diskcache'
...\dash-multi-page-app-demos>python multi_page_flask_login/app.py
Traceback (most recent call last):
File "multi_page_flask_login/app.py", line 15, in <module>
from flask_login import login_user, LoginManager, UserMixin, logout_user, current_user
ModuleNotFoundError: No module named 'flask_login'
Yes, I'm running this on Windows and should traditionally use the path separator '\' but somehow that's no longer a problem since quite a while as is easily seen by running many other examples out there. Indeed,
...\dash-multi-page-app-demos>python multi_page_query_strings/app.py
Dash is running on http://127.0.0.1:8050/
* 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
Just because I was looking for a suitable template for my applications
so I thought a collection of pages with different combinations of components would be a typical use case for a multi-page app.
Hi, Thanks for the multipage examples!
I have been dealing with this issue, e.g. \multi_page_example1
Every time I initially go to http://127.0.0.1:8050 ("/" root page)
when app.run_server(debug=True) it shows:
NotFound
werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
and in app.run_server(debug=True)
Not Found
The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
after reloading this page, it loads the contents as usual,
however I need to click the refresh button on the browser everytime : (
I searched high and low for similar issues e.g.:
https://stackoverflow.com/questions/73784593/running-dash-on-a-public-ip-werkzeug-exceptions-notfound-404-not-found
But this doesn't solve the problem.
I use conda as virtual environment, and run dash simply by running python app.py
(Serving Flask 'app' lazy loading)
Am I doing something wrong with my environment settings?
Or can I tweak the code to meet my means. Thanks!
Hi,
Is there a way that upon successful callback transaction i.e. login, user will be directed to the "home" page without the need to click a button or a link
Thank you
Hi,
The combination of dash_extensions with multipage doesn't seem to work.
The app multi_page_sync_components runs, but doesn't react to a change of the page :
I'm pretty sure it's related to dash_extensions. When converting to a standard Dash application
from dash import Dash, page_registry, page_container, html, dcc
# from dash_extensions.enrich import (
# DashProxy,
# MultiplexerTransform,
# html,
# dcc,
# )
and
# app = DashProxy(
# __name__,
# transforms=[MultiplexerTransform()],
# use_pages=True,
# prevent_initial_callbacks=True,
# suppress_callback_exceptions=True,
# )
app = Dash(__name__, use_pages=True)
changing the imports in the pages to
from dash import dcc, html, register_page, no_update, Output, Input, State, callback
# from dash_extensions.enrich import Output, Input, State, callback
in all of the pages
and also adding and referencing different dcc.Stores for and in each page (because MultiplexerTransform obviously won't work without dash_extensions), the app runs fine.
I'm working with python 3.6.13, and the following package versions (obtained by installing from the general requirements.txt file, (where dash_extensions is missing, btw.)
async-timeout==4.0.2
Brotli==1.0.9
click==8.0.4
colorama==0.4.4
contextvars==2.4
dash==2.6.2
dash-bootstrap-components==1.2.1
dash-bootstrap-templates==1.0.4
dash-core-components==2.0.0
dash-extensions==0.0.71
dash-html-components==2.0.0
dash-table==5.0.0
dataclasses==0.8
Deprecated==1.2.13
numpy==1.19.5
pandas==1.1.5
pytz==2022.5
redis==4.3.4
six==1.16.0
tenacity==8.1.0
wrapt==1.14.1
zipp==3.6.0
Kind Regards
Bart
Hi AnnMarie, running the multi_page_flask_login
app example results in an error
dash.exceptions.NoLayoutException: No layout in module
pages.login in dash.page_registry
Just highlighting in case you'd like to change it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.