Activity 8
Last updated
Was this helpful?
Last updated
Was this helpful?
<!DOCTYPE html>
<html>
<head>
<title>Welcome to Activity 8</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>
<body>
Welcome to Activity 8!
<P>
<h1>Friends Part A</h1>
<li><a href="/friends/sam">Sam</a>
<li><a href="/friends/alex">Alex</a>
<li><a href="/friends/jordan">Jordan</a>
<P>
<h1>Part B</h1>
<li><a href="/outline">Outline</a>
</body>
</html>
from flask import Flask, render_template
app = Flask(__name__)
@app.route("/")
def index():
return render_template('index.html')
@app.route("/friends")
@app.route("/friends/<name>")
def friends(name=None):
return render_template('friends.html',name=name)
@app.route("/outline")
def outline():
return render_template('outline.html')
<!DOCTYPE html>
<html>
<head>
<title>{{name}}</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>
<body>
<h1>{{name}}</h1>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Outline of your story</title>
</head>
<body>
<h1>Outline of your story</h2>
Here we are going to use nested lists (lists within lists) to organize your story.
<ul>
<li>Start at your house</li>
<li>Goto school
<ul>
<li>Enter Classroom 1</li>
<li>Enter Classroom 2</li>
</ul>
<li>Stay virtual
<ul>
<li>Enter Virtual Classroom 1</li>
<li>Enter Virtual Classroom 2</li>
</ul>
</li>
</ul>
</body>
</html>