Imagine that my initial layout depends on the logged in user. I know that
app.layout can be passed a function, but seems there are no any arguments passed to it.
(I use django-plotly-dash)
I mean before any callback are fired.
I managed to do it like this:
app.layout = html.Div(id='layout') @app.callback( Output('layout', 'children'), [Input('layout', 'id')] ) def output_layout(*args, user, **kwargs):
but now when this function renders my layout - it does not get filled with data - no callbacks called