Dear colleagues,
I'm a newcomer to Django and CouchDB. My preliminary testing of the couchdbkit via Python went just fine, but when trying to define it as a Django backend, I get an error (see below).
Is there a primer or tutorial available that describes how setup a Django with CouchDB? Anything missing?
Hints are welcome.
My steps that generated the error:
mkdir djangoapps
cd djangoapps
django-admin.py startproject aqua
cd aqua
python manage.py startapp langs
edit settings.py
added INSTALLED_APPS = (
...
'couchdbkit.ext.django',
'langs',
added:
COUCHDB_DATABASES = (
)
edit models.py
edit views.py
python manage.py syncdb
I'm using the sample published on this link:
python manage.py shell
>>> from langs.models import Language
>>> l = Language()
>>> l.description = "the best lang"
>>> l.license = "I don't care"
>>> l.save()
generates error at this line:
>>> l.save()
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "C:\Python27\lib\site-packages\couchdbkit\schema\base.py", line 431, in s
ave
db = self.get_db()
File "C:\Python27\lib\site-packages\couchdbkit\schema\base.py", line 422, in g
et_db
raise TypeError("doc database required to save document")
TypeError: doc database required to save document
Any hint is welcome.
Regards,
Claude