python-3.x - peewee playhouse.flask_utils import object_list 在首页什么都没有出现
问题描述
我正在尝试使用 peewee flask utils,但我不知道出了什么问题。它没有显示任何东西。
这是代码:
后端: https ://i.stack.imgur.com/sdPoU.png
解决方案
如果您费心阅读文档,您会看到上下文变量名为object_list
.
http://docs.peewee-orm.com/en/latest/peewee/playhouse.html#object_list
你写for article in article
的完全没有意义。
你应该写for article in object_list
推荐阅读
- tensorflow - 以字母数字代码为特征的 TensorFlow 分类
- ios - 无法在 iOS 13.3.1 中关闭 Google Admob 广告:控制台日志:[Process] kill() 返回意外错误 1
- c - 数据类型和变量之间的关键字
- python - Python中的诅咒模块Eroor
- python - Python 中的单独 print() 结果
- reactjs - 如何防止 useEffect 中的函数被多次触发?
- python - matplotlib 动画,用于在单个图形中同步移动多个形状
- html - CSS初学者,需要帮助定位重叠的DIV
- ruby-on-rails - 删除枚举的默认值
- javascript - 渲染前获取数据 [React Native]