Python Forum

Full Version: Simple web framework
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi. I have a task where I need to generate a simple html page with input field, submit button and serve http requests(in other words, I need http server on board). Any advises which framework to pick? I've never worked with web before and now just want to pick the simplest and easiest tool which will cover my needs.
Thanks.
I think for this, Flask is a good choice -
from flask import Flask, render_template

app = Flask(__file__)

@app.route('/')
def Home():
    return render_template('html_file.html')
After you create the html file this will open up a website (run locally) with everything from the html file. Another one I've heard is good is Django
(Jun-22-2019, 02:38 AM)SheeppOSU Wrote: [ -> ]I think will be east to use for this -
from flask import Flask, render_template app = Flask(__file__) @app.route('/') def Home(): return render_template('html_file.html')
After you create the html file this will open up a website (run locally) with everything from the html file. Another one I've heard is good is Django

Hi,
Flask looks simple enough, thanks.