Skip to content

Latest commit

 

History

History
48 lines (41 loc) · 2.59 KB

Class4.md

File metadata and controls

48 lines (41 loc) · 2.59 KB

Class 4: Flask Web App Development

Activities

  • Compare implementations for sampling words based on observed frequency
  • Visualize how sampling algorithms work by drawing pictures with a number line
  • Discuss tradeoffs of different sampling techniques based on histogram implementations

Objectives

After completing this class session and the associated tutorial challenges, students will be able to ...

  • Set up Python virtual environments for package isolation
  • Build and test simple Flask web apps on local computers
  • Deploy Flask web apps to Heroku cloud hosted servers

Challenges

These challenges are the baseline required to complete the project and course. Be sure to complete these before next class session and before starting on the stretch challenges below.

  • Page 5: Flask Web App
    • Set up an isolated virtual environment with virtualenv
    • Develop a Flask web app locally (access via localhost)
    • Push your Flask web app to Heroku servers (on the Web)

Stretch Challenges

These challenges are more difficult and help you push your skills and understanding to the next level.

  • Page 5: Flask Web App
    • Improve the style of your page with CSS
    • Display more than one generated word
    • Generate a specific number of words given in a URL query string parameter (like /?num=10)
    • Add a button to display a new word (i.e. refresh the page) when clicked
    • Add a button and route to store favorites (chosen by users) with a database

Resources