Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/80.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用jinja在html中呈现TextAreaField_Html_Python 3.x_Flask_Jinja2 - Fatal编程技术网

使用jinja在html中呈现TextAreaField

使用jinja在html中呈现TextAreaField,html,python-3.x,flask,jinja2,Html,Python 3.x,Flask,Jinja2,我试图将配置解析为html中python代码的TextAreaField。但它什么也没显示 下面是代码片段。当我在form.py中将TextAreaField更改为StringField时,它会显示列表的第一个元素,而不会出现任何问题 form.py app.py displayConfig.html {form.showconfig(readonly=“readonly”,value=request.args.get('showconfig'),class=“form control 表单控

我试图将配置解析为html中python代码的TextAreaField。但它什么也没显示

下面是代码片段。当我在form.py中将TextAreaField更改为StringField时,它会显示列表的第一个元素,而不会出现任何问题

form.py app.py displayConfig.html

{form.showconfig(readonly=“readonly”,value=request.args.get('showconfig'),class=“form control
表单控件lg“)}
class configDisplay(FlaskForm):
    showconfig = TextAreaField('Config', default='')

    
@app.route("/display", methods=['GET', 'POST'])
def display_page():
    form = config()
    configSet = ['ABC', 'DEF', 'GHI'] 
    return redirect(url_for('displayConfig', showconfig=configSet)
<div>
{{ form.showconfig(readonly="readonly", value=request.args.get('showconfig'), class="form-control 
   form-control-lg") }}
</div>