Created
December 6, 2009 12:24
-
-
Save thruflo/250197 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> from couchdbkit import Server | |
>>> | |
>>> # server object | |
... server = Server() | |
>>> | |
>>> # create database | |
... db = server.get_or_create_db('foo') | |
>>> db | |
<Database foo> | |
>>> db['bar'] = {'a': 1} | |
>>> db['bar'] = {'a': 2} | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
File "/env/github/digest/env/lib/python2.5/site-packages/couchdbkit-0.2.4-py2.5.egg/couchdbkit/client.py", line 738, in __setitem__ | |
self.save_doc(doc) | |
File "/env/github/digest/env/lib/python2.5/site-packages/couchdbkit-0.2.4-py2.5.egg/couchdbkit/client.py", line 404, in save_doc | |
res = self.res.put(docid, payload=doc, _raw_json=_raw_json, **params) | |
File "build/bdist.macosx-10.3-i386/egg/restkit/rest.py", line 223, in put | |
File "/env/github/digest/env/lib/python2.5/site-packages/couchdbkit-0.2.4-py2.5.egg/couchdbkit/resource.py", line 166, in request | |
response=e.response) | |
couchdbkit.resource.ResourceConflict: o |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment