TheNewAndImprovedFlaskMega-Tutorial - (EPUB全文下载)
文件大小:1.27 mb。
文件格式:epub 格式。
书籍内容:
The Flask Mega-Tutorial
Miguel Grinberg
2018-01-30
Contents
Preface
1
Who This Book Is For
2
Requirements
3
About The Example Application
4
How To Work With The Example Code
5
Conventions Used In This Book
6
Acknowledgements
Chapter 1
Hello, World!
1.1
Installing Python
1.2
Installing Flask
1.3
A “Hello, World” Flask Application
Chapter 2
Templates
2.1
What Are Templates?
2.2
Conditional Statements
2.3
Loops
2.4
Template Inheritance
Chapter 3
Web Forms
3.1
Introduction to Flask-WTF
3.2
Configuration
3.3
User Login Form
3.4
Form Templates
3.5
Form Views
3.6
Receiving Form Data
3.7
Improving Field Validation
3.8
Generating Links
Chapter 4
Database
4.1
Databases in Flask
4.2
Database Migrations
4.3
Flask-SQLAlchemy Configuration
4.4
Database Models
4.5
Creating The Migration Repository
4.6
The First Database Migration
4.7
Database Upgrade and Downgrade Workflow
4.8
Database Relationships
4.9
Play Time
4.10
Shell Context
Chapter 5
User Logins
5.1
Password Hashing
5.2
Introduction to Flask-Login
5.3
Preparing The User Model for Flask-Login
5.4
User Loader Function
5.5
Logging Users In
5.6
Logging Users Out
5.7
Requiring Users To Login
5.8
Showing The Logged In User in Templates
5.9
User Registration
Chapter 6
Profile Page and Avatars
6.1
User Profile Page
6.2
Avatars
6.3
Using Jinja2 Sub-Templates
6.4
More Interesting Profiles
6.5
Recording The Last Visit Time For a User
6.6
Profile Editor
Chapter 7
Error Handling
7.1
Error Handling in Flask
7.2
Debug Mode
7.3
Custom Error Pages
7.4
Sending Errors by Email
7.5
Logging to a File
7.6
Fixing the Duplicate Username Bug
Chapter 8
Followers
8.1
Database Relationships Revisited
8.1.1
One-to-Many
8.1.2
Many-to-Many
8.1.3
Many-to-One and One-to-One
8.2
Representing Followers
8.3
Database Model Representation
8.4
Adding and Removing “follows”
8.5
Obtaining the Posts from Followed Users
8.5.1
Joins
8.5.2
Filters
8.5.3
Sorting
8.6
Combining Own and Followed Posts
8.7
Unit Testing the User Model
8.8
Integrating Followers with the Application
Chapter 9
Pagination
9.1
Submission of Blog Posts
9.2
Displaying Blog Posts
9.3
Making It Easier to Find Users to Follow
9.4
Pagination of Blog Posts
9.5
Page Navigation
9.6
Pagination in the User Profile Page
Chapter 10
Email Support
10.1
Introduction to Flask-Mail
10.2
Flask-Mail Usage
10.3
A Simple Email Framework
10 ............
书籍插图:
以上为书籍内容预览,如需阅读全文内容请下载EPUB源文件,祝您阅读愉快。
书云 Open E-Library » TheNewAndImprovedFlaskMega-Tutorial - (EPUB全文下载)