Le 22/03/2012 20:00, Craig Younkins a écrit :
Using a fake request context is possible, but it seems like a hack. Is
it really the best solution?


I called it "fake", but it really just means setting up some pseudo-global variables such as current_app. I’d say this is a normal pattern in Flask. There is public, documented API to do it.

The alternatives are to import a specific app object or to have an explicit "app" parameter wherever you would use current_app.

--
Simon Sapin

--
You received this message because you are subscribed to the Google Groups 
"pocoo-libs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pocoo-libs?hl=en.

Reply via email to