python - 在 flask_restplus python3 中使用 fields.Wildcard() 的问题
问题描述
我正在尝试为以下结构构建一个烧瓶 restplus 模型。
"data": {
"file1": 79,
"file2": 72
}
file1 和 file2 是文件名,每次运行应用程序时都会更改。我能想到的最佳解决方案是使用通配符字段。
wild = fields.Wildcard(fields.String)
wildcard_fields = {'*': wild}
当我跑步时,我得到AttributeError: module 'flask_restplus.fields' has no attribute 'Wildcard'
请帮助我解决此问题或任何其他解决方案也值得赞赏。
谢谢!
解决方案
您是否尝试更新您的库?通配符是最近的,所以它可能是问题所在。
推荐阅读
- awk - 仅打印每行的第一个和第二个单词以使用 sed 输出
- c# - 如何解决 docker-compose 环境变量不起作用 ASP.Net Core MVC
- excel - VBA 公式填充一行太远
- user-interface - Slack Modal 视图:在最终提交之前将堆栈扩展至 3 个以上
- amazon-s3 - 将数据从 AWS 3 存储桶同步到 Azure Data Lake Gen 2 的最佳方法是什么
- bash - Github 操作 - 错误:进程已完成,退出代码为 1
- flutter - 如何在 Flutter Web 中插入 HTML 标签?
- go - 在本地测试依赖于环境变量的应用程序
- graphdb - 是否可以删除 GraphDB 中的日志?
- r - R中的分组条形图额外变量