Python Forum
Simple web framework - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html)
+--- Thread: Simple web framework (/thread-19293.html)



Simple web framework - afn - Jun-21-2019

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.


RE: Simple web framework - SheeppOSU - Jun-22-2019

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


RE: Simple web framework - afn - Jun-22-2019

(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.