couchdb etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
couchdb etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster

23 Nisan 2013 Salı

couchdb + django

http://lethain.com/an-introduction-to-using-couchdb-with-django/ is an excellent tutorial for integrating couchdb with django..
(couchdb version 0.8, django version 1.5 on Windows 7)
In order to succesfully run the example, i did the following:

- if you get the error,
cannot import name ResourceNotFound,
edit couch_docs/view.py as follows:
from couchdb.client import ResourceNotFound

- if you get the error,
AssertionError at / The XView middleware requires authentication middleware to be installed. Edit your MIDDLEWARE_CLASSES setting to insert 'django.contrib.auth.middleware.AuthenticationMiddleware'.

do what it says..

- if you get the error,
The Django authentication middleware requires session middleware to be installed. Edit your MIDDLEWARE_CLASSES setting to insert 'django.contrib.sessions.middleware.SessionMiddleware'.

do what it says.. settings.py becomes as follows:


MIDDLEWARE_CLASSES = (
    'django.middleware.common.CommonMiddleware',
    'django.middleware.doc.XViewMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
)


- if you get the error,
Error importing template source loader django.template.loaders.filesystem.load_template_source: "'module' object has no attribute 'load_template_source'"

update settings.py as follows:


TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.Loader',
    'django.template.loaders.app_directories.Loader',
#     'django.template.loaders.eggs.Loader',
)

After the above fixes, the example worked for me..

7 Nisan 2013 Pazar

introduction to couchdb

I hate studying on this beautiful Sunday morning, instead of enjoying the weather :( However, it is going to be a busy week and i need to make my system run till thesis meeting. I decided to use CouchDB, played with it through Futon interface and want to share two basic posts about it, which helped me understand the concept of document database:
http://blog.vi-kan.net/2010/introducing-couchdb/
http://blog.vi-kan.net/2010/basic-couchdb-interaction/