2021-05-01, 13:54
(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!