Couchdbkit公司设计器.push正在将文档上载为base64

2024-05-02 16:45:41 发布

您现在位置:Python中文网/ 问答频道 /正文

任何使用Couchdbkit(用于couchdb的pythonapi)的人都有和我一样的问题?你知道吗

我使用:

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

要将网站上载到couchdb,请执行以下操作:

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

正在推送所有编码为base64的\u附件。你知道吗

有什么想法吗?你知道吗


Tags: ortheselflocalhosthttppythonapidbget
1条回答
网友
1楼 · 发布于 2024-05-02 16:45:41

当我修复了上传的脚本,这是不再复制。你知道吗

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)

相关问题 更多 >