Build a webinterface
#11
(2021-05-01, 08:20)Roman_V_M Wrote: As I've said above I'm not sure that Kodi's built-in WSGI server really works. The implementation as a service addon based on wsgiref server definitely works and I used it in one of my past project.
Ok, so I changed the flask part to bottle...

Can you tell me how render html.files with bottle?
In flask I used
python:

app = Flask(__name__)
@app.route('/')
def hello_Lightymon():
return 'Welcome to Lightymon!'

@app.route('/hello')
def my_form():
return render_template('form.html')

@app.route('/hello', methods=['POST'])
def my_form_post():
direction = request.form['direction']
device = request.form['device']
processed_text = device + " " + direction TestFunction(ldevice)
return processed_text

if __name__ == '__main__':
app.run(host="0.0.0.0", port=8000, debug=False)

So how is the syntax in bottle for "render_templates" and "request.form" to get the information of this form?
Thanks!
Reply


Messages In This Thread
Build a webinterface - by M4tRiX - 2021-04-22, 14:57
RE: Build a webinferface - by pkscout - 2021-04-22, 18:29
RE: Build a webinferface - by Roman_V_M - 2021-04-23, 09:38
RE: Build a webinferface - by M4tRiX - 2021-04-24, 09:13
RE: Build a webinferface - by Sidewinder_2011 - 2021-04-24, 09:17
RE: Build a webinferface - by enen92 - 2021-04-24, 10:29
RE: Build a webinterface - by Roman_V_M - 2021-04-25, 08:13
RE: Build a webinterface - by M4tRiX - 2021-04-29, 22:08
RE: Build a webinterface - by M4tRiX - 2021-05-01, 00:39
RE: Build a webinterface - by Roman_V_M - 2021-05-01, 08:20
RE: Build a webinterface - by M4tRiX - 2021-05-01, 13:54
RE: Build a webinterface - by Roman_V_M - 2021-05-02, 07:44
RE: Build a webinterface - by Roman_V_M - 2021-05-02, 07:48
Logout Mark Read Team Forum Stats Members Help
Build a webinterface0