Intro; Copyright; Table of Contents; Preface; Who This Book Is For; How This Book Is Organized; How to Work with the Example Code; Using Code Examples; Conventions Used in This Book; Oâ#x80;#x99;Reilly Safari; How to Contact Us; Acknowledgments; Additional Thanks for the Second Edition; Part I. Introduction to Flask; Chapter 1. Installation; Creating the Application Directory; Virtual Environments; Creating a Virtual Environment with Python 3; Creating a Virtual Environment with Python 2; Working with a Virtual Environment; Installing Python Packages with pip; Chapter 2. Basic Application Structure.
Creating an Authentication BlueprintUser Authentication with Flask-Login; Preparing the User Model for Logins; Protecting Routes; Adding a Login Form; Signing Users In; Signing Users Out; Understanding How Flask-Login Works; Testing Logins; New User Registration; Adding a User Registration Form; Registering New Users; Account Confirmation; Generating Confirmation Tokens with itsdangerous; Sending Confirmation Emails; Account Management; Chapter 9. User Roles; Database Representation of Roles; Role Assignment; Role Verification; Chapter 10. User Profiles; Profile Information; User Profile Page.
Email Support with Flask-MailSending Email from the Python Shell; Integrating Emails with the Application; Sending Asynchronous Email; Chapter 7. Large Application Structure; Project Structure; Configuration Options; Application Package; Using an Application Factory; Implementing Application Functionality in a Blueprint; Application Script; Requirements File; Unit Tests; Database Setup; Running the Application; Part II. Example: A Social Blogging Application; Chapter 8. User Authentication; Authentication Extensions for Flask; Password Security; Hashing Passwords with Werkzeug.
Form Handling in View FunctionsRedirects and User Sessions; Message Flashing; Chapter 5. Databases; SQL Databases; NoSQL Databases; SQL or NoSQL?; Python Database Frameworks; Database Management with Flask-SQLAlchemy; Model Definition; Relationships; Database Operations; Creating the Tables; Inserting Rows; Modifying Rows; Deleting Rows; Querying Rows; Database Use in View Functions; Integration with the Python Shell; Database Migrations with Flask-Migrate; Creating a Migration Repository; Creating a Migration Script; Upgrading the Database; Adding More Migrations; Chapter 6. Email.
InitializationRoutes and View Functions; A Complete Application; Development Web Server; Dynamic Routes; Debug Mode; Command-Line Options; The Request-Response Cycle; Application and Request Contexts; Request Dispatching; The Request Object; Request Hooks; Responses; Flask Extensions; Chapter 3. Templates; The Jinja2 Template Engine; Rendering Templates; Variables; Control Structures; Bootstrap Integration with Flask-Bootstrap; Custom Error Pages; Links; Static Files; Localization of Dates and Times with Flask-Moment; Chapter 4. Web Forms; Configuration; Form Classes; HTML Rendering of Forms.
0
8
8
8
8
Take full creative control of your web applications with Flask, the Python-based microframework. With the second edition of this hands-on book, you'll learn Flask from the ground up by developing a complete, real-world application crreated by author Miguel Grinberg. This refreshed edition accounts for important technology changes that have occurred in the past three years.