Flask Web Development: Developing Web Applications with Python, 2nd Edition
Tags
Summary
Editor's review
Who it's for
A good fit for
- 熟悉Python基础语法、想系统入门Web后端开发的程序员或学生
- 已经会用Django或其他框架,想快速了解Flask轻量级开发模式的开发者
- 需要独立完成一个带用户系统、评论和API的完整小项目的自学者
- 正在做毕业设计或课程设计、缺少实战项目经验的高年级本科生与研究生
Not a good fit for
- 完全没有编程基础、尚未学过Python基本语法与面向对象概念的读者
- 只想查找Flask最新版本API速查手册、不打算按章节动手实践的人
- 主要做前端或数据科学、短期内不需要搭建Web服务端的读者
Reading tips
- 务必边读边敲代码,第一部分每章结束后亲手复现示例,否则到第二部分会跟不上项目节奏。
- 先读第2章和第7章,理解应用工厂函数与蓝本的用意,再回头逐章补细节,能明显降低理解难度。
- 书中的扩展版本较旧,动手时对照各扩展官网最新文档调整配置,遇到报错优先查阅官方变更说明。
- 读完后不要停在Flasky项目上,自己重写一个主题不同的小应用(如书籍收藏或待办清单),把知识迁移验证一遍。
About the publisher
Posts & Telecom Press is known for its strengths in science and technology, computing, and information and communications titles, and has extended its publishing into photography, art, software learning, and inspirational growth, giving it a fairly diverse range. Its catalog includes computing and communications works such as Refactoring and Patterns (Revised Edition) and Huawei Switch Learning Guide (Second Edition), alongside bilingual collector's editions such as The Little Prince (Chinese-English-French illustrated collector's edition), The Great Gatsby, and Three Days to See. Beijing Ten Years: 1980-1990 and Ghost Blade: WLOP Personal Illustration Collection reflect its presence in photography and art. Its authors include Antoine de Saint-Exupéry, Helen Keller, Joshua Kerievsky, Wang Da, Zhang Zhaozeng, and WLOP.
Contents
- Preface
- Part One Introduction to Flask
- Chapter 1 Installation
- 1.1 Creating the Application Directory
- 1.2 Virtual Environments
- 1.3 Creating a Virtual Environment in Python 3
- 1.4 Creating a Virtual Environment in Python 2
- 1.5 Using Virtual Environments
- 1.6 Installing Python Packages with pip
- Chapter 2 Basic Structure of an Application
- 2.1 Initialization
- 2.2 Routes and View Functions
- 2.3 A Complete Application
- 2.4 The Web Development Server
- 2.5 Dynamic Routes
- 2.6 Debug Mode
- 2.7 Command-Line Options
- 2.8 The Request-Response Cycle
- 2.9 Flask Extensions
- Chapter 3 Templates
- 3.1 The Jinja2 Template Engine
- 3.2 Integrating Bootstrap with Flask-Bootstrap
- 3.3 Custom Error Pages
- 3.4 Links
- 3.5 Static Files
- 3.6 Localizing Dates and Times with Flask-Moment
- Chapter 4 Web Forms
- 4.1 Configuration
- 4.2 Form Classes
- 4.3 Rendering Forms as HTML
- 4.4 Handling Forms in View Functions
- 4.5 Redirects and User Sessions
- 4.6 Flash Messages
- Chapter 5 Databases
- 5.1 SQL Databases
- 5.2 NoSQL Databases
- 5.3 SQL or NoSQL
- 5.4 Python Database Frameworks
- 5.5 Managing Databases with Flask-SQLAlchemy
- 5.6 Defining Models
FAQ
这本书适合完全没有编程基础的人吗?
第1版和第2版有什么区别,该买哪一本?
书里的示例代码在新版本Python和扩展库上还能跑吗?
读完后能独立开发一个上线的Web项目吗?
Comments
Find this book
This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.