Description
In this course, you will learn :
- Write complete web applications using Python and Flask.
- Accept user input through web forms.
- Use relational databases.
- Manage user logins and authentication.
- Translate and localize application messages.
- Implement a search engine.
- Add JavaScript user-friendly features.
- Application Programming Interfaces (APIs).
- Deploy your application on Linux servers or Docker containers.
- Deploy your application on Heroku.
Syllabus :
1. Templates
- What Are Templates?
- Conditional Statements
- Loops
- Template Inheritance
2. Web Forms
- Introduction to Flask-WTF
- User Login Form
- Form Templates
- Form Views
- Receiving Form Data
- Improving Field Validation
- Generating Links
3. Database
- Databases In Flask
- Database Migrations
- Flask-SQLAlchemy Configuration
- Database Models
- Creating the Migration Repository
- The First Database Migration
- Database Upgrade and Downgrade Workflow
- Database Relationships
- Play Time
- Shell Context
4. User Logins
- Password Hashing
- Introduction to Flask-Login
- Preparing the User Model for Flask-Login
- User Loader Function
- Logging Users In
- Logging Users Out
- Requiring Users to Log In
- Showing the Logged In User in Templates
- User Registration
5. Profile Page and Avatars
- User Profile Page
- Avatars
- Using Jinja2 Sub-Templates
- More Interesting Profiles
- Recording The Last Visit Time For a User
- Profile Editor
6. Error Handling
- Error Handling in Flask
- Debug Mode
- Custom Error Pages
- Sending Errors by Email
- Logging to a File
- Fixing the Duplicate Username Bug
7. Followers
- Database Relationships Revisited
- Representing Followers
- Database Model Representation
- Adding and Removing "follows"
- Obtaining the Posts from Followed Users
- Combining Own and Followed Posts
- Unit Testing the User Model
- Integrating Followers with the Application
8. Pagination
- Submission of Blog Posts
- Displaying Blog Posts
- Making It Easier to Find Users to Follow
- Pagination of Blog Posts
- Page Navigation
- Pagination in the User Profile Page
9. Email Support
- Introduction to Flask-Mail
- Flask-Mail Usage
- A Simple Email Framework
- Request a Password Reset
- Password Reset Tokens
- Sending a Password Reset Email
- Resetting a User Password
- Asynchronous Emails
10. Facelift
- CSS Frameworks
- Introducing Bootstrap
- Using Flask-Bootstrap
- Rendering Bootstrap Forms
- Rendering of Blog Posts
- Rendering Pagination Links
- Before and After
11. Dates and Times
- Timezone Hell
- Timezone Conversions
- Introducing Moment.js and Flask-Moment
- Using Moment.js
12. I18n and L10n
- Introduction to Flask-Babel
- Marking Texts to Translate in Python Source Code
- Marking Texts to Translate in Templates
- Extracting Text to Translate
- Generating a Language Catalog
- Updating the Translations
- Translating Dates and Times
- Command-Line Enhancements
13. Ajax
- Server-side vs. Client-side
- Live Translation Workflow
- Language Identification
- Displaying a "Translate" Link
- Using a Third-Party Translation Service
- Ajax From The Server
- Ajax From The Client
14. A Better Application Structure
- Current Limitations
- Blueprints
- The Application Factory Pattern
- Unit Testing Improvements
- Environment Variables
- Requirements File
15. Full-Text Search
- Introduction to Full-Text Search Engines
- Installing Elasticsearch
- Elasticsearch Tutorial
- Elasticsearch Configuration
- A Full-Text Search Abstration
- Integrating Searches with SQLAlchemy
- Search Form
- Search View Function
16. Deployment on Linux
- Traditional Hosting
- Creating a Ubuntu Server
- Using a SSH Client
- Password-Less Logins
- Securing Your Server
- Installing Base Dependencies
- Installing the Application
- Setting Up MySQL
- Setting Up Gunicorn and Supervisor
- Setting Up Nginx
- Deploying Application Updates
- Raspberry Pi Hosting
17. Deployment on Heroku
- Hosting on Heroku
- Creating a Heroku Account
- Installing the Heroku CLI
- Setting Up Git
- Creating a Heroku Application
- The Ephemeral File System
- Working With a Heroku Postgres Database
- Logging to Stdout
- Compiled Translations
- Elasticsearch Hosting
- Updates to Requirements
- The Procfile
- Deploying the Application
- Deploying Application Upgrades
18. Deployment on Docker Containers
- Installing Docker CE
- Building a Container Image
- Starting a Container
- Using Third-Party "Containerized" Services
- The Docker Container Registry
- Deployment of Containerized Applications
19. Some JavaScript Magic
- Server-side Support
- Introduction to the Bootstrap Popover Component
- Executing a Function on Page Load
- Finding DOM Elements with Selectors
- Popovers and the DOM
- Hover Events
- Ajax Requests
- Popover Creation and Destruction
20. User Notifications
- Private Messages
- Static Message Notification Badge
- Dynamic Message Notification Badge
- Delivering Notifications to Clients
21. Background Jobs
- Introduction to Task Queues
- Using RQ
- Database Representation of Tasks
- Integrating RQ with the Flask Application
- Sending Emails from the RQ Task
- Task Helpers
- Implementing the Export Task
- Export Functionality in the Application
- Progress Notifications
- Deployment Considerations
22. Application Programming Interfaces (APIs)
- REST as a Foundation of API Design
- Implementing an API Blueprint
- Representing Users as JSON Objects
- Representing Collections of Users
- Error Handling
- User Resource Endpoints
- API Authentication
- API Friendly Error Messages