Commits

Anonymous committed f8fd800

update for latest couchdbkit

Comments (0)

Files changed (2)

couchit/documents.py

 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #
 from datetime import datetime
-from couchdbkit import *
+from couchdbkit.resource import ResourceNotFound, ResourceConflict
+from couchdbkit.schema import *
 from couchit.utils import db, make_hash
 from couchit.utils.diff import unified_diff, diff_blocks
 
         self.save()
         return self
 
-db.contain(PasswordToken, Site, AliasPage, Page)
+contain(db, PasswordToken, Site, AliasPage, Page)

couchit/utils/__init__.py

 _install_hooks = []
 
 def get_db():
-    from couchdbkit import Server, create_session
+    from couchdbkit import Server
     server = Server(settings.SERVER_URI)
-    return create_session(server, settings.DATABASE_NAME, Local)
+    return server.get_or_create_db(settings.DATABASE_NAME)
 db = get_db()
 
 def subclass_exception(name, parent, module):