From 1efac39d9de9b13cf729a5c759ff9ac51ed776e5 Mon Sep 17 00:00:00 2001 From: Wu Jiang Date: Tue, 24 Mar 2015 12:13:43 -0400 Subject: [PATCH] provide MONGODB_USERNAME flask_mongoengine uses `MONGODB_USERNAME` https://github.com/MongoEngine/flask-mongoengine/blob/bd7ff7ef040f710b00ff74807fc8788652674809/flask_mongoengine/__init__.py#L89 --- flask_heroku.py | 1 + 1 file changed, 1 insertion(+) diff --git a/flask_heroku.py b/flask_heroku.py index 392ea2f..a493ad1 100644 --- a/flask_heroku.py +++ b/flask_heroku.py @@ -78,6 +78,7 @@ def init_app(self, app): url = urlparse(mongolab_uri) app.config.setdefault('MONGO_URI', mongolab_uri) app.config.setdefault('MONGODB_USER', url.username) + app.config.setdefault('MONGODB_USERNAME', url.username) app.config.setdefault('MONGODB_PASSWORD', url.password) app.config.setdefault('MONGODB_HOST', url.hostname) app.config.setdefault('MONGODB_PORT', url.port)