-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Labels
Description
This may be a bit too generic question, but I'm attempting it anyway:
It would be awesome if the there was examples of a more "real-life" flask app. As a rule we split up the app into multiple classes (one class per route), and also move "helpers" into separate class functions (static or not).
It's not completely clear to me how I would go about maintining a reference to the instantiated FlaskTracer
object (called tracer
in the examples).
- For route classes we usually "cheat" by importing them after the app object is instantiated, so those can reference the
FlaskTracer
by importing it from the app class - However, for helpers these are usually imported before the app object is instantiated (as a normal import).
I guess I'm looking for best-practices in how to deal the FlaskTracer
throughout my app. Some more advanced examples would be awesome.
ror6ax