Skip to content

Instantly share code, notes, and snippets.

@rpicard
Last active December 21, 2015 02:09
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rpicard/de3aa850f921d2bf67fe to your computer and use it in GitHub Desktop.
Save rpicard/de3aa850f921d2bf67fe to your computer and use it in GitHub Desktop.
Outline for Flask book
I. Introduction
..1. Justification for the book
..2. Assumptions
....a. Audience
....b. Versions
......i. Python 2 versus 3
......ii. Flask version 0.10
..3. Update schedule for the book
..4. Each chapter stands on its own
..5. Conventions used in the book
....a. Formatting
..6. Summary
II. Coding Conventions
..1. Code style
..2. Documentation
..3. Importing
....a. Use relative imports
....b. Watch out for circular imports
..4. Summary
III. Environment
..1. virtualenv
..2. virtualenvwrapper
..3. Requirements
....a. Multiple requirements files
..4. Version control
....a. What to keep out of version control
..5. Development databases
..6. Testing infrastructure
..7. Summary
IV. Organizing your project
..1. Definitions
..2. Structure types
....a. Single module
....b. Package
....c. Package with Blueprints
..3. Summary
V. Configuration
..1. Basic configuration setup
....a. config.py
....b. Useful configuration variables and values
..2. Configuring for multiple environments
....a. config_from_envvar
..3. Instance folders
....a. Hiding secret data
..4. Summary
VI. Views and routing
..1. View decorators
....a. Authentication
....b. Caching
....c. Custom decorators
..2. URL Converters
....a. Built-in converters
....b. Custom converters
..3. Summary
VII. Blueprints
..1. What is a blueprint?
..2. Why would you use blueprints?
..3. Where do you put them?
....a. Functional structure
....b. Divisional structure
....c. Which one is best?
..4. Basic usage
..5. Dynamic path prefix
..6. Dynamic subdomains
..7. Refactoring small apps
..8. Registering a blueprint multiple times
..9. Summary
VIII. Templates
..1. Quick Jinja primer
..2. Inheritance
..3. Organizing templates
....a. templates/ in package
....b. Layout.html for each section
..4. Building URLs
....a. Static assets
....b. Other views
..5. Escaping user input
..6. Creating macros
..7. Custom filters
..8. Summary
IX. Static files
..1. Organizing your files
..2. Manage static assets with Flask-Assets
....a. Defining bundles
....b. Using your bundles
....c. Using filters
......a. Compressing JS and CSS
......b. Compiling to JS and CSS
..3. Summary
X. Storing Data
..1. Use SQLAlchemy for relational databases
..2. Alembic database migrations
..3. Database backups
..4. NoSQL
..5. Summary
XI. Handling forms
..1. Use Flask-WTF
..2. Form validation and CSRF protection
..3. Custom validators
..4. Rendering forms
..5. File uploads
..6. Summary
XII. Handling users
..1. Email confirmation
..2. Storing passwords
..3. Authentication
....a. Flask-Login
..4. Forgot your password
..5. Email changes
..6. Summary
XIII. Serving an API
..1. Primer on REST
..2. Serving JSON
..3. Keeping state
..4. Pluggable views
..5. Backing a front-end framework
..6. Summary
XIV. Testing
..1. The joy of testing
..2. Tools for testing
....a. unittest
....b. factory_boy
..3. Organizing tests
..4. What to test
..5. Using signals
..6. Running tests
..7. Test coverage
..8. Test-driven development
..9. Summary
XV. Deploying
..1. Linux server (AWS or Digital Ocean)
....a. Front server
......a. nginx
......b. Apache
....b. App runner
......a. gunicorn
......b. uwsgi
....c. Manage deployment with fabric
..2. Heroku
..3. Summary
XVI. Debugging
..1. Built-in tools for debugging
....a. The stack trace
....b. The interactive console
..2. Flask-DebugToolbar
..3. Logging
..4. Summary
XVII. Conclusion
@rpicard
Copy link
Author

rpicard commented Oct 13, 2013

I just removed the section on mobility from the view decorators. I'm personally an advocate of responsive web design, and splitting the templates into mobile / not mobile goes doesn't seem right.

@led
Copy link

led commented Nov 5, 2013

Any thoughts on including a section on flask-sockets?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment