Activity 5

Video Presentation

Starter Code - index.html

<!DOCTYPE html>
<html>
    <head>
        <title>hello, world!</title>
    </head>
    <body>
        Welcome to Activity 5!
        <P>
        Try my new flask route: <a href="/hello">hello!</A>
    </body>
</html>

Starter Code - hello.html

<!DOCTYPE html>
<html>
    <head>
        <title>hello, world!</title>
    </head>
    <body>
        hello new page!
    </body>
</html>

Starter Code - application.py

from flask import Flask, render_template
app = Flask(__name__)

@app.route("/")
def index():
    return render_template('index.html')
    
@app.route("/hello")
def hello():
    return render_template('hello.html')

Last updated

Was this helpful?