Claudio Gil
Claudio Gil

Reputation: 1

Show Python variable in HTML with Bottle

I'm switching from flask to bottle, I need to display the SSID on my web page.

My flask script was:

Python:

return render_template('home.html', form=form, ssid=ssid)

HTML:

<p>Device name: {{ ssid }}</p>

I cannot find how to do that in bottle.

Upvotes: 0

Views: 421

Answers (1)

ludel
ludel

Reputation: 91

Using template function:

from bottle import template

return template('home.html', ssid=ssid)

Upvotes: 2

Related Questions