Answer the question
In order to leave comments, you need to log in
Blueprint (flask)?
Good evening dear toasters, I have started using blueprint in my flask application.
And I have accumulated a lot of questions that Google could not clearly answer (or I'm stupid).
And so, I have several routers - this /
is the root of the application (performs the function of a redirect between pages), /submit
- ala login form, /homepage
- here I will not say anything, /logout
- here I will also keep silent.
And so I will start bombarding with questions!
1. Is it worth it or is it possible to put all pages into a separate blueprint? (for convenience)
2. How to do it
4. If you should not use blueprint for routers, then how to put them into separate files?
5. Will there be simple examples of this approach?
And thanks a lot for your replies! :) extends 'index.html'
(Ie you need to connect the blueprint markup to the root html)?
3. How to transfer variables between blueprints?
Answer the question
In order to leave comments, you need to log in
1) which means all pages. if you have only 4 actions, then create the main blueprint and your routers in it
. Share all the blueprints. Figuratively speaking, the main blueprint, posts, users.
If these are all pages, then I don’t see much point.
2) 2 was answered in the comment
3) the question says nothing, what variables?
4) you can create a file separate router.pu and spoil it in init
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question