售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Building Web Applications with Flask
Table of Contents
Building Web Applications with Flask
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Flask in a Flask, I Mean, Book
An introduction to Flask and its features
Summary
2. First App, How Hard Could it Be?
Hello World
Prerequisites and tools
Setting up a virtual environment
Understanding the "Hello World" app
Serving HTML pages
Summary
3. Man, Do I Like Templates!
What is Jinja2 and how is it coupled with Flask?
What can you do with Jinja2?
Control structures
Macros
Extensions
Filters
Messing with the template context
Summary
4. Please Fill in This Form, Madam
HTML forms for the faint of heart
Handling forms
WTForms and you
Flask-WTF
Integration with WTForms
Securing forms with a CSRF token
Challenges
Summary
5. Where Do You Store Your Stuff?
SQLAlchemy
Concepts
Hands on
Flask-SQLAlchemy
MongoDB
MongoEngine
Flask-MongoEngine
Relational versus NoSQL
Summary
6. But I Wanna REST Mom, Now!
Beyond GET
Flask-Restless
Summary
7. If Ain't Tested, It Ain't Game, Bro!
What kinds of test are there?
Unit testing
Behavior testing
Flask-testing
LiveServer
Extra assertions
JSON handle
Fixtures
Extra – integration testing
Summary
8. Tips and Tricks or Flask Wizardry 101
Overengineering
Premature optimization
Blueprints 101
Oh God, please tell me you have the logs…
Debugging, DebugToolbar, and happiness
Flask-DebugToolbar
Sessions or storing user data between requests
Exercise
Summary
9. Extensions, How I Love Thee
How to configure extensions
Flask-Principal and Flask-Login (aka Batman and Robin)
Admin like a boss
Custom pages
Summary
10. What Now?
You deploy better than my ex
Placing your code in a server
Setting up your database
Setting up the web server
StackOverflow
Structuring your projects
Summary
Postscript
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜