Dash on Multi-Page Site, @app.route? (Flask to Dash)

Hi, everybody
I have some troubles with callbacks in this app
I split my code to 5 files.
in first file my dash app
in second file my callbacks
in third file my layout
in fourth file my app configuration
in last - routing with navigation

when I choose /price callbacks don’t work. None of them!
What might be wrong with my code?
Also my import from file “callbacks” stands out gray (might be doesn’t work).

import dash
import dash_core_components as dcc
import dash_html_components as html
from flask import Flask, render_template

from app import app, flask_app
import callbacks
from layout import app as l1

app.layout = html.Div([
    dcc.Location(id='url', refresh=False),
    dcc.Link('Navigate to "/price"', href='/price'),
    html.Br(),
    dcc.Link('Navigate to "/likvid"', href='/likvid'),
    html.Div(id='page-content')
])


@app.callback(dash.dependencies.Output('page-content', 'children'),
              [dash.dependencies.Input('url', 'pathname')])
def display_page(pathname):
    if pathname == '/likvid':
        return '1'
    elif pathname == '/price':
        return l1.layout
    else:
        return 'wkhnwpo;ih;wvgi'


if __name__ == '__main__':
    flask_app.run()

consider deploying an identity-aware proxy in front of your app, that would handle user authentication by integrating with your authentication provider (i.e. Google, Microsoft, LDAP, Okta, Auth0) AND authorization (which users are allowed). there are open source, on-premise and cloud-managed solutions, depending on your deployment strategy.

check out this example https://github.com/gwrun/tutorials/tree/main/plotly-dash/docker-compose

check this once

I really like that! I was struggling to establish a listener in a page having all the setout layout with a number of tabs prepared in dash

you figured this one out by calling the flask server first and doing the “hello” section before defining dash (server = server …

In that way both flask and dash work smoothly together