Reputation: 5084
I want the function I pass to before_first_request_funcs
the ability to access app.config
object.
Can I pass an argument to the function somehow?
Access the "current app object" (it is not really global and I can just access it, right?)
Upvotes: 0
Views: 362
Reputation: 4987
Yes, just access the current_app
. This is the way to do it. The before_first_request
callback run inside the app context.
Upvotes: 2