Sending post request from Django to Couchdb remote server

79 views
Skip to first unread message

psychok7

unread,
Aug 29, 2012, 12:33:20 AM8/29/12
to django...@googlegroups.com
So, i have a fully operational django project with postgresql to manage its contents.   Nevertheless i decided to create a second database using couchdb to keep just one part of that data. Should i use *urllib2* and send post requests to my couchdb to save the new data or this is just bad programming (not secure,etc) and i should use something else?
Thanks

Psamathos

unread,
Aug 29, 2012, 12:59:30 AM8/29/12
to django...@googlegroups.com
CouchDB is meant to be used RESTfully, so go ahead and create those POST requests. That said, there are several Django backends that will help you to communicate with CouchDB but this might be more trouble than it's worth. It all depends on what you need from CouchDB. Personally I'd forego any wrappers and just use it directly. You sacrifice some of the flexibility and power of CouchDB by hiding behind Django's RDBMS-centric backend.

If you're worried about security, which is really only an issue if you choose to expose the CouchDB server to the Internet, then go ahead and look into the various authentication options offered by CouchDB. However, if it's just eavesdropping you're worried about, you can configure your CouchDB server to use SSL and limit its connections to those originating from your server only.
Reply all
Reply to author
Forward
0 new messages