Commits

remosu committed d160ae2

default values for configuration parameters if backmongo_conf module not exists

new values in examples/todos/backmongo_conf.py to test

Comments (0)

Files changed (2)

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

examples/todos/backmongo_conf.py

 
-DATABASE = "backmongo"
-OID_PREFIX = 'oid_'
+DATABASE = "backmongo_todos"
+OID_PREFIX = 'todoid_'