Skip to Content
Flask Web开发:基于Python的Web应用开发实战(第2版)
book

Flask Web开发:基于Python的Web应用开发实战(第2版)

by Miguel Grinberg
August 2018
Intermediate to advanced
230 pages
6h 42m
Chinese
O'Reilly Media, Inc. Beijing
Content preview from Flask Web开发:基于Python的Web应用开发实战(第2版)
4
1
如果你决定使用运行微软
Windows
系统的计算机,那么要做个选择:要么使
用基于
Windows
的“原生”工具集,要么设置计算机,沿用基于
Unix
的主
流工具集。本书中的代码基本上在两种方式下都能正常运行。偶有差异时,
本书采用
Unix
方式,不过也会给出针对
Windows
的说明。
如果你决定采用
Unix
工作流程,有几个选择。如果你使用的是
Windows 10
可以启用
WSL
Windows subsystem for Linux
)。这是官方支持的功能,在
Windows
原生界面中独立运行
Ubuntu Linux
。通过
WSL
可以访问
bash shell
和基于
Unix
的全套工具集。如果你的系统不支持
WSL
Cygwin
也是不错
的选择。这是一个开源项目,模仿
Unix
POSIX
子系统,而且移植了大量
Unix
工具。
1.1
 创建应用目录
首先,要新建一个目录,存放从
GitHub
仓库中下载的示例代码。前言的“如何使用示例
代码”部分已经说过,最简单的方法是使用
Git
客户端直接从
GitHub
仓库中拉取代码。下
述命令从
GitHub
中下载示例代码,并检出应用的
1a
版本。我们将从这一版开始。
$
git clone https://github.com/miguelgrinberg/flasky.git
$
cd flasky
$
git checkout 1a
如果你不想使用
Git
,打算自己动手输入或复制代码,像下面这样新建一个空应用目录即可:
$
mkdir flasky
$
cd flasky
1.2 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Python机器学习基础教程

Python机器学习基础教程

Andreas C. Müller, Sarah Guido
Python编程入门与实战

Python编程入门与实战

Posts & Telecom Press, Fabrizio Romano
程序设计导论:Python语言实践

程序设计导论:Python语言实践

罗伯特 塞奇威克, 凯文 韦恩, 罗伯特 唐德罗

Publisher Resources

ISBN: 9787115489456