From 294e1800a2d4b353f69a527c9a2388a41875e3e9 Mon Sep 17 00:00:00 2001 From: Brij Mohan Date: Sat, 18 Feb 2017 20:43:36 -0600 Subject: [PATCH] Changed Connection to MongoClient Updated this to make this compatible with latest MongoDB Driver --- professor/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/professor/__init__.py b/professor/__init__.py index 736e540..72663bc 100644 --- a/professor/__init__.py +++ b/professor/__init__.py @@ -41,7 +41,7 @@ class SessionFlask(SessionMixin, Flask): pass import pymongo dbname = app.config.get('MONGODB_CONFIG', {}).pop('db', 'professor') -conn = pymongo.Connection(**app.config.get('MONGODB_CONFIG', {})) +conn = pymongo.MongoClient(**app.config.get('MONGODB_CONFIG', {})) db = conn[dbname] app.session_store = MongoSessionStore(db.session)