{"action":"closed","issue":{"number":10,"created_at":"2011-10-11T14:12:05Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"Hi,\r\n\r\nI'm unsure where the problem truly lies, but as best as I can tell at the moment, this is something that seems to work with Flask-SQLAlchemy and not with Flask-MonogEngine. So I thought I'd open up an issue thread here and see if there's any insight that can be provided.\r\n\r\nEssentially what is happening is I have an application with a couple of Blueprint objects that need to share the db object. They expect to import this from the project, e.g. `from project import db`. However this is resulting in an ImportError.\r\n\r\nThe app object is created in the project's `__init__.py` the blueprints are registered and then the db object is created.\r\n\r\n    app = Flask(__name__)\r\n    \r\n    from project.views.admin import admin\r\n    from project.views.frontend import frontend\r\n    app.register_blueprint(admin)\r\n    app.register_blueprint(frontend)\r\n    \r\n    db = MongoEngine(app)\r\n\r\nThe blueprints are making use of their own set of document models. This is where the import error occurs, seemingly because the db object hasn't been created yet. It seems odd though that such a configuration would work with SQLAlchemy.\r\n\r\nIt's quite possible I'm doing something blatantly wrong here. However this model does seem to work with other ORMs, so perhaps there's a trick to getting it to work with MongoEngine?","comments":2,"title":"Blueprints seem unsupported","updated_at":"2011-10-11T17:33:23Z","url":"https://api.github.com/repos/sbook/flask-mongoengine/issues/10","id":1875044,"assignee":null,"milestone":null,"closed_at":"2011-10-11T17:33:23Z","user":{"avatar_url":"https://secure.gravatar.com/avatar/e2096369c53e9931ee9ce70bc4b26e5d?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/maxcountryman","id":74351,"login":"maxcountryman"},"html_url":"https://github.com/sbook/flask-mongoengine/issues/10","labels":[],"state":"closed"},"legacy":{"number":10,"action":"closed","issue":1875044}}