An example used in Harvey Mudd's intro CS course to teach students basic webdev + Flask
Link to project, hosted on PythonAnywhere
Harvey Mudd's introductory CS course, CS5, delves into several topics; one of which being webdev. As the class is taught in Python, the webdev unit strives to incorporate it as much as possible. Thus, students are taught the basics of Flask, a Python framework for web applications. In this tutorial, students are guided through a simple exercise to build their own webapp.
Specifically, they learn how to:
- create a virtual environment
- incorporate Python with HTML, CSS, and JS
- use basic POST and GET requests
and for extra credit, they can:
- add a local database using SQLAlchemy
- upload their project to GitHub
- host their website on PythonAnywhere
The demo itself is a very simple version of Twitter called "wart warbles" after HMC's unofficial mascot, Wally the Wart. What people type into the textbox is saved as a post, or a "warble", for other people to see. There is a small chance that your warble may be garbled into pig latin, however.