Commits

remosu committed 5bf51a9

close #2 connection parameters in backmongo_conf.py

  • Participants
  • Parent commits 0879ee8

Comments (0)

Files changed (2)

File backmongo.py

 from pymongo.objectid import ObjectId
 
 try:
-    from backmongo_conf import DATABASE, OID_PREFIX
+    from backmongo_conf import DATABASE, OID_PREFIX, CONNECTION_ARGS
 except ImportError:
     DATABASE = 'backmongo'
     OID_PREFIX = 'oid_'
+    CONNECTION_ARGS = {}
 
-CONNECTION = pymongo.Connection()
+CONNECTION = pymongo.Connection(**CONNECTION_ARGS)
 DB = CONNECTION[DATABASE]
 
 

File examples/todos/backmongo_conf.py

 
 DATABASE = "backmongo_todos"
+
 OID_PREFIX = 'todoid_'
+
+CONNECTION_ARGS = {
+
+}