Skip to content

Instantly share code, notes, and snippets.

@macloo
Created March 18, 2020 13:36
Show Gist options
  • Save macloo/0738318aeff9f965c2ea46658762054c to your computer and use it in GitHub Desktop.
Save macloo/0738318aeff9f965c2ea46658762054c to your computer and use it in GitHub Desktop.
Starter template for Flask + Jinja
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ pres["President"] }}</title>
<link rel="stylesheet" href="{{ url_for('static', filename='main.css') }}">
</head>
<body>
<div id="container">
<h1>{{ pres["President"] }}</h1>
<img class="right" src="{{ url_for('static', filename='pr16.jpg') }}">
<p>{{ pres["President"] }} was born on {{ pres['Birth-date'] }}, in {{ pres["Home-state"] }}. He was {{ pres['Age-when-took-office'] }} when he took office on {{ pres["Took-office"] }}. He was a member of the {{ pres['Party'] }} Party. His occupation before the presidency: {{ pres["Occupation"] }}.</p>
<p><a href="link">View Wikipedia entry for {{ pres["President"] }}.</a></p>
<p><a href="index.html">Return to the list</a> to select a different president.</p>
</div>
</body>
</html>
@macloo
Copy link
Author

macloo commented Mar 18, 2020

There are things that need to be changed here. This is an INCOMPLETE template.

This file represents the state of the template at the end of this video:
https://www.youtube.com/watch?v=FztRv9ZvlXo

@macloo
Copy link
Author

macloo commented Mar 18, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment