File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change
1
+ 项目计划
2
+
3
+ 项目计划开发周期为16天。每天,你需要完成教程中的内容。如果你觉得编写代码难度实在太大,可以参考一下当天在GitHub上的代码。
4
+
5
+ 第N天的代码在https://github.com/michaelliao/awesome-python-webapp/tree/day-N上。比如第1天就是:
6
+
7
+ https://github.com/michaelliao/awesome-python-webapp/tree/day-01
8
+
9
+ 以此类推。
10
+
11
+ 要预览awesome-python-webapp的最终页面效果,请猛击:
12
+
13
+ awesome.liaoxuefeng.com
14
+
15
+ day01
16
+ 搭建开发环境
17
+
18
+ 首先,确认系统安装的Python版本是2.7.x:
19
+
20
+ $ python --version
21
+ Python 2.7.5
22
+ 然后,安装开发Web App需要的第三方库:
23
+
24
+ 前端模板引擎jinja2:
25
+
26
+ $ easy_install jinja2
27
+ MySQL 5.x数据库,从官方网站http://dev.mysql.com/downloads/mysql/5.6.html下载并安装,安装完毕后,请务必牢记root口令。为避免遗忘口令,建议直接把root口令设置为password;
28
+
29
+ MySQL的Python驱动程序mysql-connector-python:
30
+
31
+ $ easy_install mysql-connector-python
32
+
33
+ awesome-python-webapp/ <-- 根目录
34
+ |
35
+ +- backup/ <-- 备份目录
36
+ |
37
+ +- conf/ <-- 配置文件
38
+ |
39
+ +- dist/ <-- 打包目录
40
+ |
41
+ +- www/ <-- Web目录,存放.py文件
42
+ | |
43
+ | +- static/ <-- 存放静态文件
44
+ | |
45
+ | +- templates/ <-- 存放模板文件
46
+ |
47
+ +- LICENSE <-- 代码LICENSE
48
+
49
+ 创建好项目的目录结构后,建议同时建立Git仓库并同步至GitHub,保证代码修改的安全。
50
+
You can’t perform that action at this time.
0 commit comments