Skip to content

Access State From Other Pages #2487

Answered by FlorianJacta
ilia4bit asked this question in Q&A
Discussion options

You must be logged in to vote

You don't have to define all your variables in one place. The variable that should be the same for each page should only be defined once and imported into your main.py.

Sometimes, we have a root page, a page which content is shared by every page. We can define the variable there once and import it inside your main.py.

Does that make sense?

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ilia4bit
Comment options

@FlorianJacta
Comment options

Answer selected by ilia4bit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants