Created
June 30, 2013 14:33
-
-
Save RobSpectre/5895373 to your computer and use it in GitHub Desktop.
Quick example of Flask templating
This file contains hidden or 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 | |
from flask import render_template | |
app = Flask(__name__) | |
@app.route('/') | |
def index(): | |
return render_template('index.html') | |
if __name__ == "__main__": | |
app.run() |
This file contains hidden or 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
<!-- This file should be in the ./templates subdirectory. --> | |
<html> | |
<body> | |
<h1>HELLLLLLLLLLLLLLOOOO WORLD!</h1> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
how can i run this in github pages
Error 404 is showing when i try to run this flask project.