Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion flaskdemo.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def home():

@app.route('/about')
def about():
return "I am still working on this"
return render_template("about.html")


@app.route('/search', methods=['POST', 'GET'])
Expand Down
8 changes: 8 additions & 0 deletions templates/about.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{% extends "layout.html" %}
{% block title %}About{% endblock %}
{% block content %}
<h1>James is cool.</h1>
<h2> Practical 10</h2>
<p>This is the about page for practical 10</p>
<img width="800" height="800" src="https://media.tenor.com/x8v1oNUOmg4AAAAd/rickroll-roll.gif">
{% endblock %}
1 change: 1 addition & 0 deletions templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<div id="nav">
<a href="{{ url_for('home') }}">Home</a> |
<a href="{{ url_for('search') }}">Search</a>
<a href="{{ url_for('about') }}">About</a>
</div>
<div id="content">
{% block content %}{% endblock %}
Expand Down
2 changes: 1 addition & 1 deletion templates/results.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
{% block title %}Wikipedia Results{% endblock %}
{% block content %}
{% if page %}
{# TODO: add page title and more... #}

<h1>Results</h1>
<h2>Summary </h2>
<p>{{ page.summary }}</p>
<p><a href="{{ page.url }}"> {{ page.title }}</a> </p>
Expand Down