This commit is contained in:
Rich
2021-07-03 08:17:46 +01:00
parent f88a6a9f81
commit 582fca2e90
7 changed files with 64 additions and 21 deletions

View File

@@ -1,7 +1,13 @@
from flask import render_template
from app import app
@app.route("/")
@app.route("/index")
def index():
return "Hello, World!"
user = {"username": "Miguel"}
posts = [
{"author": {"username": "John"}, "body": "Beautiful day in Portland!"},
{"author": {"username": "Susan"}, "body": "The Avengers movie was so cool!"},
]
return render_template("index.html", title="Home", user=user, posts=posts)