Comments (4)
Where do you see that it is a dash-extensions error?
from dash-extensions.
It seems to me flask login manager cannot be used when using dash_extensions.
This error appears:
AttributeError: 'Flask' object has no attribute 'login_manager'
`
app = Dash(prevent_initial_callbacks=True)
navBar = dbc.Navbar(id='navBar',
children=[],
sticky='top',
color='primary',
className='navbar navbar-expand-lg navbar-dark bg-primary',
)
app.layout = html.Div([
dcc.Store(id='server-memory-storage'),
html.Div(id="onload"), # this div is used to trigger the query_df function on page load
html.Label(id='contentoftest1'),
dcc.Location(id='url', refresh=False),
html.Div([
navBar,
html.Div(id='pageContent')
])
], id='table-wrapper')
@app.callback(ServersideOutput("server-memory-storage", "data"), Trigger("onload", "children"))
def store_variable():
print("store_variable")
data = test1
return(data)
@app.callback(Output("contentoftest1", "children"), ServerInput("server-memory-storage", "data"))
def print_df(df):
print("print")
return str(df.x) # do something with the data
#print(current_user.is_authenticated)
@app.callback(Output('pageContent', 'children'),
[Input('url', 'pathname')])
def displayPage(pathname):
if pathname == '/':
if current_user.is_authenticated:
return page1.layout
else:
return login.layout
elif pathname == '/logout':
if current_user.is_authenticated:
logout_user()
return login.layout
else:
return login.layout
`
When I change app = Dash(prevent_initial_callbacks=True) to from app import app, the ServersideOutput cannot work
from dash-extensions.
I am not sure I understand what is going on. Could you post an MWE that works with vanilla Dash, but not with dash-extensions?
from dash-extensions.
Closed due to inactivity.
from dash-extensions.
Related Issues (20)
- ModuleNotFoundError: No module named 'BeforeAfter' HOT 6
- EventListener nested properties not working HOT 4
- adding LogTransform to app causes Duplicate callback output error HOT 7
- `EventListener` support for the `resize` event? HOT 2
- Recursion for resolving callbacks HOT 1
- Publish to unpkg CDN HOT 4
- Outdated dependency react-lottie
- Outdated mermaid HOT 1
- Support for Flask Caching 2.1.0 HOT 2
- Websocket - SocketIO version compatibility
- Hope to configure WebSocket URL based on server URL
- `EventListener` only triggers once unless `props` change HOT 6
- Serverside() versus ServersideOutput() HOT 2
- Specifying the use of the `key` variable for `Serverside` objects in the documentation HOT 1
- Serverside how to use memory as backend HOT 2
- Background cancellation does not work with DashProxy
- Fixed Keys in Serverside callback HOT 1
- Serve locally: False - Cannot find package [email protected] HOT 4
- Delete of Serverside objects when key is regenerated HOT 4
- MultiplexerTransform sometimes not enough HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dash-extensions.