kcunning / flask-class

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

flask-class

This is the repo for a Flask class I teach fairly often for DC PyLadies.

Topics covered in this class:

  • HTML
  • CSS (Including Bootstrap)
  • Flask
  • Virtualenv and virtualenvwrapper
  • Deployment
  • Best practices

Topics not covered:

  • Python
  • Javascript and jQuery
  • Fabric and server set-up

Sections

This class will be run in three sections. The first is dedicated to set-up and installation. The second will cover HTML and CSS. The third covers development with Flask.

These classes can occur on the same day, if you don't mind a long day, or you're dealing with students who are already proficient with developing for the web. If you have a class that is new to any of the topics, however, you may want to teach the classes on their own days.

Section 1

  • Install:
    • virtualenv and virtualenvwrapper
    • pip and easy install
    • Flask (just to check)
    • SQLite
  • Goals:
    • Make sure all students can run the stack
    • Explain what will be covered in the next two classes
  • Note: This is not a 'class' per se, but can be used to optimize the time alloted for the actual classes. Full attention can be given to problematic systems, and students will be able to tinker around on their own time.

Section 2

  • What is HTML?
    • What are tags?
    • Creating a basic HTML document
    • Validating your HTML
    • Adding media
    • Forms
    • Let's talk about browsers...
    • Let's check out what others are doing!
  • What is CSS?
    • What is CSS?
    • Most basic selectors
    • Adding classes
    • Adding IDs
    • So what can we do?
      • Borders
      • Backgrounds
      • Colors
      • Transformation
      • (More to come)
    • Introducing Bootstrap!
      • Using bootstrap
      • Overriding bootstrap

Section 3

  • What is Flask?
    • What can it do?
    • What can't it do?
  • Making a Flask environment
    • Why sandbox?
    • Checkout sample website
    • Let's talk about git...
  • A five minute review of Python!
  • Basic flask site
    • Adding a template
    • Adding variables
    • It's just Python! (adding random)
    • Adding a new view
  • Advanced templates and styling
    • Using jinja functionality
    • Inheriting templates
    • Let's make it pretty... (adding Bootstrap)
  • Let's add some forms
    • Install WTForms
    • Let's talk about requirements.txt
    • What's this cross-site stuff?
    • Form to nowhere
    • Form to SOMEWHERE
    • Adding custom validation
  • (In development)

About

License:MIT License


Languages

Language:Python 61.1%Language:HTML 38.9%