Answers for "flask documentation"

18

python flask

from flask import Flask

app = Flask(__name__)

@app.route('/')
def index():
  return "Hello world!" #if you want to render a .html file, 
                        # import render_template from flask and use 
                        #render_template("index.html") here.

if __name__ == '__main__':
    app.debug = True
    app.run() #go to http://localhost:5000/ to view the page.
Posted by: Guest on July-21-2020
0

flask documentation

from flask import Flask

app = Flask(__name__)

@app.route("/")
def hello_world():
    return "<p>Hello, World!</p>"
Posted by: Guest on October-01-2021
0

Flask documentation

py -3 -m venv venv
Posted by: Guest on August-20-2021
-1

flask documentation

$ export FLASK_ENV=development
$ flask run
(On Windows you need to use 'set' instead of 'export'.)
Posted by: Guest on June-23-2021

Python Answers by Framework

Browse Popular Code Answers by Language