Created
March 3, 2019 16:54
-
-
Save saiyerniakhil/6f86960705c2f4f1d3a562640609b06e to your computer and use it in GitHub Desktop.
An actual flask web app with basic functionalities
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>My Web App</title> | |
</head> | |
<body> | |
<h1>This is the first route</h1> | |
<a href="/">back</a> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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