After a day of really digging in, I’ve found that trying to build views using the structure shown in the examples gets really messy and with all the nesting it’s really easy to break.
I’m in the process of splitting up my views in to different py scripts to manage different parts of the page.
- database query result lists / cards
I would appreciate suggestions on how to split callbacks to it’s own py file. I know how to do this with objects & functions but I’m not sure how to handle this since it’s using decorators.
For instance, how would you populate the following files, so that you can import a reactive form objective in to app.py.
What I’d like to have in the end is a very simple app.py file such as this one below:
import dash import dash_bootstrap_components as dbc from dash_bootstrap_components import Jumbotron import dash_html_components as html from dash_html_components import Br, P from navigation.top import TopNav #this is working from components.forms.rfs_new import active_form #this isnt app = dash.Dash() app.layout = html.Div( [ TopNav(), Br(), Container( Jumbotron(P('This is example text')) ), Container( Jumbotron(active_form()) ) ] ) if __name__ == "__main__": app.run_server(port=8888, debug=True)