Answers for "flask int route"

1

how to create routes in flask

from flask import Flask
app = Flask(__name__)

@app.route("/")
def index():
    # This will return Hello World in an h1 tag when you go to localhost:5000
    return '<h1>Hello World</h1>'
@app.route("/signup")
def sign_up():
    # This will return Sign Up in an h1 tag when you go to localhost:5000
    return '<h1>Sign Up</h1>'
  
app.run(debug=True)
Posted by: Guest on October-29-2021
0

flask int route

#for int route
#<int:param>
Posted by: Guest on February-18-2022

Python Answers by Framework

Browse Popular Code Answers by Language