在flask中使用模板时,出现如下报错:
TypeError: 'NamedSignal' object is not callable
给出目录结构:
blog\
app\
static\
templates\
index.html
__init__.py
views.py
run.py
给出views.py代码:
# -*- coding:utf-8 -*-
from flask import template_rendered
from app import app
@app.route('/')
def index():
title = '我是title'
content = '我是内容'
return template_rendered('index.html', title = title, content = content)
一直报错,不使用模板就可以正常。这个会是什么原因?求助!!!
同学。。。是rendertemplate,不是templaterendered...