Couchdbkit designer.push is uploading documents as base64

96 Views Asked by At

anyone using Couchdbkit (python api for couchdb) has had the same issue than I?

I use:

 $ couchapp push site http://localhost:5984/the_site

To upload a website into couchdb but as I do in python:

 >>> db = self.__serv.get_or_create_db("reports") 
 >>> designer.push('/path/to/site', db)

Is pushing all _attachments encoded as base64.

Any thoughts?

1

There are 1 best solutions below

0
On BEST ANSWER

When I fixed the script for uploading this was not any longer reproduced.

import os
from couchdbkit import Server, designer
__serv = Server(uri = 'http://192.168.11.13:5984')
website = os.path.join(os.getcwd(), "path_to_website")
database = __serv.get_or_create_db("website")
designer.push(website, database, atomic = False)