Skip to content
kwmccabe edited this page Apr 23, 2018 · 14 revisions

Contents

Application Setup

  • Commit-v0.1 - Hello FlaskApp: docker-compose.yml, web/Dockerfile, web/requirements.txt, web/flaskapp.py
  • Commit-v0.2 - start.sh, stop.sh, entrypoint.sh, gunicorn-access.log, gunicorn-errors.log, volumes, .gitignore
  • Commit-v0.3 - Hello PythonDebugger
  • Commit-v0.4 - app.create_app(), AppConfig, RUN apk add tzdata
  • Commit-v0.5 - AppConfig: DevelopmentConfig, TestingConfig, ProductionConfig, ENV FLASK_CONFIG
  • Commit-v0.6 - app.init_logging(), LOG_FILE, LOG_LEVEL, logging.info()

Modules, Templates, and Layouts

  • Commit-v0.7 - Blueprint modules: main, item
  • Commit-v0.8 - render_template("hello.html", message=message)
  • Commit-v0.9 - Generic /page/ route, init /static directory
  • Commit-v0.10 - Flask-Bootstrap, base.html, navbar_main.html
  • Commit-v0.11 - utils.flashed_messages() added to base.html, 403.html, 404.html, 410.html

Database Items, Forms, and CRUD

  • Commit-v0.12 - Hello DB: MySQL service, Flask-SQLAlchemy, MySQL-Connector-Python
  • Commit-v0.13 - ItemModel, hello_orm()
  • Commit-v0.14 - List Items (/admin/item/list) and View Item (/admin/item/view/int:id)
  • Commit-v0.15 - Flask-WTF: item_create, item_edit, item_delete
  • Commit-v0.16 - Item fields (active,item_title,item_text,mod_update), Delete Item confirmation

List Filter, Sort, and Paginate

  • Commit-v0.17 - item_action() route and item checkboxes
  • Commit-v0.18 - Init item_list() options for ItemModel filter,sort,paginate
  • Commit-v0.19 - Move item_list() options to session
  • Commit-v0.20 - Create decorator for item_list() options
  • Commit-v0.21 - Update get_list_opts() decorator and item_list.html page for pagination

Users and Login

  • Commit-v0.22 - User module: tables.sql, models, forms, views, templates
  • Commit-v0.23 - Add fields user_email and user_pass
  • Commit-v0.24 - Flask-Login: update UserModel, add /login and /profile, decorate routes with @login_required
  • Commit-v0.25 - Add User columns: cnt_login, mod_login, mod_create, mod_update

Database Relationships

  • Commit-v0.26 - Link ItemModel to UserMode with item.owner_id
  • Commit-v0.27 - @app.context_processor: current_datetime(), debug_queries()
  • Commit-v0.28 - Many-to-many link through ItemUserModel and new item_user table

API Module, HTTPAuth and JSON

  • Commit-v0.29 - API module, Flask-HTTPAuth
  • Commit-v0.30 - API Module: Token-Based Auth, upgrade /api/item and /api/user

Refactoring User Roles and Item Status

  • Commit-v0.31 - Convert user.active to user.user_role
  • Commit-v0.32 - Refactor user.user_role value and display constants
  • Commit-v0.33 - Refactor item.active as item.item_status
  • Commit-v0.34 - Colors per user_role or item_status added to /list routes
  • Commit-v0.35 - Refine decorator login_required() as role_required(role)

AJAX and Public Pages

  • Commit-v0.36 - layout_2col, getItemBrowser(), getItemDetail(), xhr_required()

TODO

  • Public Search
  • GOOGLE_ANALYTICS_ID

FlaskApp Tutorial | Table of Contents | About

Clone this wiki locally