You can clone with
HTTPS or Subversion.
In my eyes flask-mongokit fulfil all requirements for a aproved extension.
PS: It is already listed under extensions.
There was a update of Flask-MongoKit which use the new cool app_context and it should be a good example of usage for other extension developers so it would be great to be a approved extension.
I think .init_app(app) should not set self.app = app.
self.app = app
from flask import Flask
from flask.ext.mongokit import MongoKit
main_app = Flask(__name__)
mongo = MongoKit(main_app)
admin_app = Flask(__name__)
In this case, mongo should use main_app when out of context.
See also: https://github.com/mitsuhiko/flask-sqlalchemy/blob/master/flask_sqlalchemy.py#L783
Thanks for this hint. I'm not 100% sure if you have a context than the extension should use the app of the context and is there no context than it should use the defined app, right?
@jarus http://flask.pocoo.org/docs/extensiondev/#initializing-extensions doesn't mention about fallbacking to default app.
But if extension has some feature they don't require app_context, allowing to use them outside of context is helpful.
please refile against https://github.com/pocoo/metaflask