Flask渲染温度

2024-05-16 07:38:11 发布

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

我尝试将数据插入我的模板

data = Bill.bill_data(self)
        return render_template('templates/bill.html', **data)

票据模板在文件夹模板中的位置。但我有个错误

jinja2.exceptions.TemplateNotFound: templates/bill.html

我的数据如下:

data={
        "payer_currency": "5",
        "shop_amount": "5",
        "shop_currency": "5",
        "shop_id": "5",
        "shop_order_id": "12",
        "sign": ""
        }

Tags: 数据self模板iddatareturnhtmltemplate