【发布时间】:2019-11-29 00:04:25
【问题描述】:
我正在从烧瓶切换到瓶子,我需要在我的网页上显示 SSID。
我的烧瓶脚本是:
Python:
return render_template('home.html', form=form, ssid=ssid)
HTML:
<p>Device name: {{ ssid }}</p>
我在瓶子里找不到怎么做。
【问题讨论】:
我正在从烧瓶切换到瓶子,我需要在我的网页上显示 SSID。
我的烧瓶脚本是:
Python:
return render_template('home.html', form=form, ssid=ssid)
HTML:
<p>Device name: {{ ssid }}</p>
我在瓶子里找不到怎么做。
【问题讨论】:
使用模板函数:
from bottle import template
return template('home.html', ssid=ssid)
【讨论】: