Problem getting CouchDB running w. Django

305 Views Asked by At

I'm having trouble getting my Django project to work with a CouchDB database.

I'm running Python 2.6.6, Django 1.3, and Lion on a Mac

I've got Django, CouchDB, and CouchDBKit installed. I can import all of them from the python interpreter without a problem. If I go to my CouchDB database URL, I can see the db.

The problem is, when I try to go to my django project URL, I get the following error:

You haven't set the database ENGINE setting yet.

I have the following lines in my settings.py file:

COUCHDB_DATABASES = (
('my_project.my_db', 'http://127.0.0.1:5984/my_db'),
)

The only possible solution I've found so far, is to set a throwaway database in the normal database engine settings. But, this just throws another error, because Django starts looking for database tables in the throw away DB.

Edit with new info: I'm accessing my DB via an SSH tunnel I'm able to create and access a CouchDB from the python interpeter. I've run a test from the python interpreter, to access the app DB (again, via the tunnel), and the returned data accurately. It's just when I try to access the actual site from a browser URL, I get the engine not defined error.

Django seems to be trying to use a normal DB (which isn't setup), instead of the CouchDB.

Any ideas?

0

There are 0 best solutions below