External Exam Download Resources Web Applications Games Recycle Bin

Flask

Flask: A web framework for Python

Web Applications
# Flask Jinja2
Might be worth knowing first..
Flask launch
Flask routes
Flask templates
Jinja2 variables
Jinja2 if else
Jinja2 for loops
Jinja2 url_for CSS grid
Flask GET and POST
Flask session
Flask file uploads
 
older course materials:
launching flask apps
# Unit 1. Creating with code: section A
installation
hello
catching errors uses batch file
detecting changes debug=True
@decorators explains the @
rendering html (output)
# Unit 1. Creating with code: section B
output
flask_url_segments
output questions
templates folder
Jinja2 {{variables}} in templates
jinja2_calculations
static folder for css & js
alt to render_template (dont use)
URL Routing pages & segments
Jinja2 & data structures
# Unit 1. Creating with code: section C
if then
for loop list & dict
parsing py tuple heterogeneous
is not defined
inputs, methods=['GET', 'POST']
# Unit 1. Creating with code: section D
inputs
feedback
search
session["variables"]
uploader
folder traversal
file mangler
SQLite, Python & Flask
# Unit 2. Application and data solutions
SQLite Skills
SQLite Airline
SQLite Examples
SQLite Foreign keys
SQLite Distribution Example
Data formats
# Unit 3: Digital innovation
CSV
XML (RSS)
JSON
more CSV examples
more JSON examples
APIs, REST & Cryptography
# Unit 4: Digital impacts
Building a simple API
Querying existing API (JSON)
Developing a RESTful API
Cryptography
Other web techniques
# Interest only
Image Processing
Geolocation API
Client Server
Threading
Web Sockets long polling, not websockets
Installing Flask on a live Linux (Ubuntu) server:
# you need a paypal or a credit card
sign up for a domain name. use google e.g., netregistry / crazydomains, about $15 per year
sign up for cheapest web hosting plan. i use binary lane $4 per month
write down IP address and root password
point domain (nameserver) to IP address
point registered domain name to nameservers
change ubuntu (linux) root password. if you dont like the browser container window use PuTTY
update and upgrade your server OS
install Apache2 HTTP server
use Certbot to enable TLS on HTTP (aka HTTPS)
use SSH for file transfer. i like FileZilla
sudo update-alternatives --set python /usr/bin/python3.6 if you dont want 2.x
(pip) install flask
use WSGI to forward requests to flask