lundi 20 avril 2020

http://127.0.0.1:5000/ not reloading / not working

My first code was:

from flask import *

app = Flask(__name__)

@app.route("/")
def index():
    return "Hello World"

app.run()

On page: Hello World (fine)

My second code is:

from flask import *

app = Flask(__name__)

@app.route("/")
def index():
    return render_template("index.html")

@app.route("/about")
def about():
    pass

app.run()

On my html file I just got <h1>I am h1</h1>

It keeps saying "Hello World". I've already tried with debug..




Aucun commentaire:

Enregistrer un commentaire