Skip to content

Commit da02e57

Browse files
author
Martin O'Hanlon
authored
Merge pull request #21 from raspberrypilearning/draft
Release x platform changes
2 parents bb34feb + a14ca8a commit da02e57

24 files changed

+512
-229
lines changed

en/images/flask-app-link.png

50.2 KB
Loading
16.4 KB
Loading

en/images/flask-template.png

27.3 KB
Loading

en/images/idle-css.png

56.1 KB
Loading

en/images/idle-flask.png

66.2 KB
Loading

en/images/idle-html.png

42.1 KB
Loading

en/images/pi-run-web-app.png

50.2 KB
Loading

en/images/showcase.png

10.3 KB
Loading

en/meta.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,19 @@ ingredient: false
1010
copyedit: true
1111
curriculum: 3, design-0, programming-3, phys-comp-0, manufacture-0, community-0
1212
interests: ''
13-
technologies: raspberry-pi, python, html-css-javascript
13+
technologies: python, html-css-javascript
1414
site_areas: projects
1515
hardware: ''
1616
software: python, html-css-javascript
17-
version: 4
18-
last_tested: 2017-01-01
17+
version: 4.1
18+
last_tested: 2018-08-02
1919
steps:
2020
- title: Introduction
21-
- title: What you will need
22-
- title: Installing Flask
23-
- title: Building a basic Flask web application
24-
- title: Adding a new route to your web app
25-
- title: Add HTML templates to your web app
26-
- title: Adding colour to the web page with CSS
27-
- title: Adding dynamic content to a view
28-
- title: Browsing on other devices
21+
- title: Build a Flask website
22+
- title: Add a new page
23+
- title: Using HTML
24+
- title: "Challenge: Add a HTML template to your 2nd page"
25+
challenge: true
26+
- title: Add colour with CSS
27+
- title: Adding dynamic content
2928
- title: What next?

en/solutions/webapp/app.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
from flask import Flask, render_template
2+
3+
app = Flask(__name__)
4+
5+
@app.route('/')
6+
def index():
7+
return render_template('index.html')
8+
9+
@app.route('/cakes')
10+
def cakes():
11+
return render_template('cakes.html')
12+
13+
@app.route('/hello/<name>')
14+
def hello(name):
15+
return render_template('page.html', name=name)
16+
17+
if __name__ == '__main__':
18+
app.run(debug=True, host='0.0.0.0')

0 commit comments

Comments
 (0)