cobrateam / flask-mongoalchemy

Flask support for MongoDB using MongoAlchemy.
https://pythonhosted.org/Flask-MongoAlchemy/
BSD 2-Clause "Simplified" License
217 stars 45 forks source link

Extension cannot be instanciated more than once #22

Closed rslinckx closed 13 years ago

rslinckx commented 13 years ago

Because the Document class is mangled during the init_app, if I create 2 MongoAlchemy instances, one of them will no longer work properly because it's attached to the wrong session.

fsouza commented 13 years ago

Thanks for your feedback, I hope to fix it next weekend.

fsouza commented 13 years ago

I've just tagged 0.5, fixing this bug.

Please take another look:

$ [sudo] pip install flask-mongoalchemy==0.5