2024-10-03 13:24:05 发布
网友
通常,如果我们在域配置中没有为'source'fieid指定值,pythoneve框架将创建mongodb集合作为资源名。你知道吗
但是,如果要使用不同的名称而不是资源名称创建mongodb集合,我需要更改的eve配置是什么?你知道吗
致以最诚挚的问候, 纳伦德拉
从docs:
source: Name of the database collection consumed by the resource. If omitted, the resource name is assumed to also be a valid collection name.
source
所以,看起来datasource.source就是您要查找的设置。像这样:
datasource.source
endpoint = { 'datasource': { 'source': "mycollectioname" } }
从docs:
所以,看起来
datasource.source
就是您要查找的设置。像这样:相关问题 更多 >
编程相关推荐