Anonymous avatar 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):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.