Skip to content

Instantly share code, notes, and snippets.

@saiyerniakhil
Created March 3, 2019 16:54
Show Gist options
  • Save saiyerniakhil/6f86960705c2f4f1d3a562640609b06e to your computer and use it in GitHub Desktop.
Save saiyerniakhil/6f86960705c2f4f1d3a562640609b06e to your computer and use it in GitHub Desktop.
An actual flask web app with basic functionalities
from flask import Flask,render_template
app = Flask(__name__)
@app.route("/")
def hello():
return render_template("index.html")
@app.route("/first")
def first():
return render_template("first.html")
<html>
<head>
<title>My Web App</title>
</head>
<body>
<h1>This is the first route</h1>
<a href="/">back</a>
</body>
</html>
<html>
<head>
<title>My Web App</title>
</head>
<body>
<h1>Hello, World!</h1>
<a href="/first">first</a>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment