Skip to content

method init_app of MongoEngine can't use config from __init__ #338

Closed
@minghu6

Description

@minghu6

I create MongoEngine somewhere: db = MongoEngine(config=myconfig)
And init the app int the app.py(flask entrypoint) :

app = Flask(__name__)
db.init_app(app)  # import from above

It's wired that MongoEngine instance use None instead of myconfig as its config.

I strongly recommend to hold the config when __init__ and check self.config in init_app

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: enhancementEnhancement update for old feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions