Created
March 18, 2020 13:36
-
-
Save macloo/0738318aeff9f965c2ea46658762054c to your computer and use it in GitHub Desktop.
Starter template for Flask + Jinja
This file contains 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
<!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> |
Other files for this project are here:
https://github.com/macloo/python-adv-web-apps/tree/master/python_code_examples/flask/presidents
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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