欢迎使用Flask 0.11¶
Welcome to Flask’s documentation. This documentation is divided into different parts. I recommend that you get started with Installation and then head over to the Quickstart. Besides the quickstart, there is also a more detailed Tutorial that shows how to create a complete (albeit small) application with Flask. 想要深入了解 Flask内部细节,请查阅 API 文档。Flask 代码模式 章节介绍了一些常见模式。
Flask依赖两个外部库:Jinja2模板引擎和Werkzeug WSGI工具集。这两个库的文档没有包含这里。如果您想深入了解他们的文档,请查看以下链接:
本文档最初的翻译迁移自Flask 0.10的翻译,感谢初始译者。
用户指南¶
这部分文档很枯燥,以介绍 Flask 的背景开始,然后注重说明 Flask 的 Web 开发的各个步骤。
- Foreword
- 有经验的程序员前言
- Installation
- Quickstart
- 教程
- Templates
- 测试Flask应用程序
- 应用报错
- 调试应用程序错误
- 配置处理
- 信号
- 可插入视图
- The Application Context
- The Request Context
- Modular Applications with Blueprints
- Flask Extensions
- Command Line Interface
- Development Server
- Working with the Shell
- Patterns for Flask
- Larger Applications
- Application Factories
- Application Dispatching
- Implementing API Exceptions
- Using URL Processors
- Deploying with Setuptools
- Deploying with Fabric
- Using SQLite 3 with Flask
- SQLAlchemy in Flask
- Uploading Files
- Caching
- View Decorators
- Form Validation with WTForms
- Template Inheritance
- Message Flashing
- AJAX with jQuery
- Custom Error Pages
- Lazily Loading Views
- MongoKit in Flask
- Adding a favicon
- Streaming Contents
- Deferred Request Callbacks
- Adding HTTP Method Overrides
- Request Content Checksums
- 基于Celery的后台任务
- Subclassing Flask
- Deployment Options
- Becoming Big
API指南¶
如果您正在查找关于特定功能,类别或方法的信息,则这部分文档适合您。
- API
- Application Object
- Blueprint Objects
- Incoming Request Data
- Response Objects
- Sessions
- Session Interface
- Test Client
- Application Globals
- Useful Functions and Classes
- Message Flashing
- JSON Support
- Template Rendering
- Configuration
- Extensions
- Stream Helpers
- Useful Internals
- Signals
- Class-Based Views
- URL Route Registrations
- View Function Options
- Command Line Interface