正常渲染了index.html文件 但是登录后报错'current_user' is undefined

来源:5-1 管理员登录和列表页面

weixin_慕圣6092728

2022-05-01

在配置好 @route_index.route("/")
def index():
return render_template(“index/index.html”) 正常渲染了index.html文件
但是启动服务后报错:
File “/home/DEEPROUTE/zhichenghe/project/shop/shoptest/web/templates/common/layout_main.html”, line 74, in top-level template code
image

麻烦老师给看下哈?

写回答

1回答

编程浪子

2022-05-06

你好

这个应该是相关方法没有将current 传递到页面导致的 。最近公司比较忙,比较急的话加我1586538192

0
1
weixin_慕码人1148180
同样这个问题 index根本没传数据过去 html render不了
2024-10-03
共1条回复

Python Flask构建微信小程序订餐系统(可用于毕设)

微信小程序 + Python Flask 打造订餐系统全栈应用,可用于毕设。

1734 学习 · 1913 问题

查看课程