Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Support lazy initialization / use init_app #81

Closed
wojcikstefan opened this issue May 5, 2016 · 1 comment · Fixed by #137 · May be fixed by #85
Closed

Support lazy initialization / use init_app #81

wojcikstefan opened this issue May 5, 2016 · 1 comment · Fixed by #137 · May be fixed by #85

Comments

@wojcikstefan
Copy link
Member

Thus making us more consistent with the approach recommended at http://flask.pocoo.org/docs/0.10/extensiondev/#the-extension-code

We should be able to enable the API in two ways:

  1. MongoRest(app) (already supported).
  2. api = Mongorest() -> app creation (e.g. app = create_app('the-config.cfg')) -> api.init_app(app).

In the 1st case, MongoRest's __init__ should call init_app.

See #55 for a proposed solution that unfortunately never made it to the master.

@wojcikstefan wojcikstefan changed the title Support lazy initialization Support lazy initialization / use init_app May 5, 2016
@frankV
Copy link

frankV commented Jul 3, 2016

Let's get this done. I commented in #55 that I'd like to work at getting it merged

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants