diff options
author | drebs <drebs@leap.se> | 2013-12-16 10:56:57 -0200 |
---|---|---|
committer | drebs <drebs@leap.se> | 2013-12-18 14:36:59 -0200 |
commit | 69762784c41f9e231260d1e790a4a5c05bf6de96 (patch) | |
tree | 98eddbb4b146e2cff336a76075390eff7dc587aa | |
parent | ae2894ba47ee5bc905f298db6b67ae40af6ebd74 (diff) |
Monkey-patch u1db to use CouchDocument.
-rw-r--r-- | common/src/leap/soledad/common/couch.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/common/src/leap/soledad/common/couch.py b/common/src/leap/soledad/common/couch.py index 3b0e042a..4caaf48f 100644 --- a/common/src/leap/soledad/common/couch.py +++ b/common/src/leap/soledad/common/couch.py @@ -29,6 +29,7 @@ import socket from u1db.backends import CommonBackend, CommonSyncTarget +from u1db.remote import http_app from u1db.remote.server_state import ServerState from u1db import ( errors, @@ -159,6 +160,10 @@ class CouchDocument(SoledadDocument): couch_rev = property(_get_couch_rev, _set_couch_rev) +# monkey-patch the u1db http app to use CouchDocument +http_app.Document = CouchDocument + + class CouchDatabase(CommonBackend): """ A U1DB implementation that uses CouchDB as its persistence layer. |