Re: [flask] Re: flask-oauth and blueprints
- Wouter Bolsterlee
- 2013-03-19 @ 07:50
Perhaps you could try the before_first_request hook. It runs before the
first request is served, but within an application context.
Alexis Georges <firstname.lastname@example.org>schreef:
>I tried that but I received an error saying that I was not running within
an application context (on the go, and don't have the exact error
message). I figure that is because, as in Armin's oauth example, I am
creating the remote_app outside of a request handler.
>On Tuesday, March 19, 2013, Steven Kryskalla wrote:
>On Tue, Mar 19, 2013 at 12:12 AM, Alexis Georges
>> I am having a problem with setting up the google remote_app inside of a
>> blueprint however, since I don't have access to the app's config in which I
>> am storing the CLIENT_ID and CLIENT_SECRET.
>Try using flask.current_app: