Description |
1 online resource (1 volume) : illustrations. |
Series |
Community experience distilled |
|
Community experience distilled.
|
Note |
Includes index. |
Contents |
Cover; Copyright; Credits; About the Authors; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: Creating your First Flask Application; What is Flask?; With great freedom comes great responsibility; Setting up a development environment; Supporting Python 3; Installing Python packages; Installing pip; Installing virtualenv; Why use virtualenv?; Installing virtualenv with pip; Creating your first Flask app; Installing Flask in your virtualenv; Hello, Flask!; Understanding the code; Routes and requests; Reading values from the request; Debugging Flask applications |
|
Introducing the blog projectThe spec; Creating the blog project; A barebones Flask app; Zooming out; The import flow; Summary; Chapter 2: Relational Databases with SQLAlchemy; Why use a relational database?; Introducing SQLAlchemy; Installing SQLAlchemy; Using SQLAlchemy in our Flask app; Choosing a database engine; Connecting to the database; Creating the Entry model; Creating the Entry table; Working with the Entry model; Making changes to an existing entry; Deleting an entry; Retrieving blog entries; Filtering the list of entries; Special lookups; Combining expressions; Negation |
|
Operator precedenceBuilding a tagging system; Adding and removing tags from entries; Using backrefs; Making changes to the schema; Adding Flask-Migrate to our project; Creating the initial migration; Adding a status column; Summary; Chapter 3: Templates and Views; Introducing Jinja2; Basic template operations; Loops, control structures, and template programming; Jinja2 built-in filters; Creating a base template for the blog; Creating a URL scheme; Defining the URL routes; Building the index view; Building the detail view; Listing entries matching a given tag; Listing all the tags |
|
Full-text searchAdding pagination links; Enhancing the blog app; Summary; Chapter 4: Forms and Validation; Getting started with WTForms; Defining a form for the Entry model; A form with a view; The create.html template; Handling form submissions; Validating input and displaying error messages; Editing existing entries; The edit.html template; Deleting entries; Cleaning up; Using flash messages; Displaying flash messages in the template; Saving and modifying tags on posts; Image uploads; Processing file uploads; The image upload template; Serving static files; Summary |
|
Chapter 5: Authenticating UsersCreating a user model; Installing Flask-Login; Implementing the Flask-Login interface; Creating user objects; Login and logout views; The login template; Logging out; Accessing the current user; Restricting access to views; Storing an entry's author; Setting the author on blog entries; Protecting the edit and delete views; Displaying a user's drafts; Sessions; Summary; Chapter 6: Building an Administrative Dashboard; Installing Flask-Admin; Adding Flask-Admin to our app; Exposing models through the Admin; Customizing the list views |
Subject |
Web applications -- Development.
|
|
Web site development.
|
|
Python (Computer program language)
|
|
Applications Web -- Développement. |
|
Sites Web -- Développement. |
|
Python (Langage de programmation) |
|
Python (Computer program language) |
|
Web site development |
Added Author |
Leifer, Charles, author.
|
Added Title |
Build dynamic, data-driven websites and modern web applications with Flask |
ISBN |
9781783983377 |
|
178398337X |
|
1783983361 |
|
9781783983360 |
|