在好例子网,分享、交流、成长!
您当前所在位置:首页Python 开发实例Python语言基础 → Python 3 Web Development. Beginners Guide.pdf

Python 3 Web Development. Beginners Guide.pdf

Python语言基础

下载此实例
  • 开发语言:Python
  • 实例大小:4.51M
  • 下载次数:14
  • 浏览次数:149
  • 发布时间:2021-01-22
  • 实例类别:Python语言基础
  • 发 布 人:gong33
  • 文件格式:.pdf
  • 所需积分:2
 相关标签:

实例介绍

【实例简介】

【实例截图】

from clipboard

【核心代码】

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
Table of Contents
Preface 1
Chapter 1: Choosing Your Tools 7
Identifying the components of a web application 7
Time for action – getting an overview of a web application 8
Choosing suitable tools 10
Time for action – choosing a delivery framework, also known as web server 11
Time for action – choosing a server-side scripting language 12
Time for action – choosing a database engine 14
Time for action – deciding on object relational mappers 15
Time for action – choosing a presentation framework 17
Designing for maintainability and usability 18
Testing 18
Time for action – choosing a test framework 19
Version management 19
Usability 20
Good looking – adhering to common GUI paradigms 20
Themable 21
Cross-browser compatible 21
Cross-platform compatible 22
Maintainability 22
Standards compliant 22
Security 23
Reliable 23
Robust 23
Access control and authentication 24
Confidentiality 24
Integrity 25
A final word on security 25
Help, I am confused! 25
Time for action – maintaining overview 26
Summary 28
Table of Contents
[ ii ]
Chapter 2: Creating a Simple Spreadsheet 29
Python 3 30
Time for action – installing Python 3 CherryPy 30
Time for action – installing CherryPy 31
Installing jQuery and jQuery UI 31
Serving an application 32
Time for action – serving a dummy application 33
Time for action – serving HTML as dynamic content 34
Who serves what: an overview 36
HTML: separating form and content 37
Time for action – a unit convertor 38
HTML: form-based interaction 39
JavaScript: using jQuery UI widgets 40
Time for action – conversion using unitconverter.js 40
jQuery selectors 42
CSS: applying a jQuery UI theme to other elements 43
Time for action – converting a unit convertor into a plugin 45
JavaScript: creating a jQuery UI plugin 46
Designing a spreadsheet application 51
Time for action – serving a spreadsheet application 51
HTML: keeping it simple 52
JavaScript: creating a spreadsheet plugin 52
The missing parts 58
Summary 58
Chapter 3: Tasklist I: Persistence 59
Designing a tasklist application 59
Time for action – creating a logon screen 62
Serving a logon screen 69
Setting up a session 70
Expiring a session 71
Designing a task list 72
Time for action – running tasklist.py 72
Python: the task module 75
Time for action – implementing the task module 76
Adding new tasks 80
Deleting a task 81
JavaScript: tasklist.js 83
Time for action – styling the buttons 83
JavaScript: tooltip.js 85
Time for action – implementing inline labels 86
Table of Contents
[ iii ]
CSS: tasklist.css 87
Summary 90
Chapter 4: Tasklist II: Databases and AJAX 91
The advantages of a database compared to a filesystem 92
Choosing a database engine 92
Database-driven authentication 93
Time for action – authentication using a database 94
Tasklist II – storing tasks in a database 99
Improving interactivity with AJAX 99
Time for action – getting the time with AJAX 100
Redesigning the Tasklist application 102
Database design 103
Time for action – creating the task database 103
Time for action – retrieving information with select statements 105
TaskDB – interfacing with the database 106
Time for action – connecting to the database 106
Time for action – storing and retrieving information 107
Time for action – updating and deleting information 109
Testing 111
Time for action – testing factorial.py 112
Now what have we gained? 113
Time for action – writing unit tests for tasklistdb.py 114
Designing for AJAX 116
Click handlers 120
The application 121
Time for action – putting it all together 123
Have a go hero – refreshing the itemlist on a regular basis 125
Summary 126
Chapter 5: Entities and Relations 127
Designing a book database 127
The Entity class 128
Time for action – using the Entity class 129
Time for action – creating instances 132
The Relation class 138
Time for action – using the Relation class 138
Relation instances 141
Time for action – defining the Books database 144
The delivery layer 150
Time for action – designing the delivery layer 151
Time for action – adding a new book 162
Table of Contents
[ iv ]
Auto completion 165
Time for action – using input fields with auto completion 166
The presentation layer 168
Time for action – using an enhanced presentation layer 168
Summary 170
Chapter 6: Building a Wiki 171
The data layer 172
Time for action – designing the wiki data model 172
The delivery layer 175
Time for action – implementing the opening screen 176
The structural components 177
The application methods 179
Time for action – implementing a wiki topic screen 180
Time for action – editing wiki topics 182
Additional functionality 185
Time for action – selecting an image 185
Time for action – implementing a tag cloud 190
Time for action – searching for words 192
The importance of input validation 195
Time for action – scrubbing your content 196
Time for action – rendering content 200
Summary 201
Chapter 7: Refactoring Code for Reuse 203
Time for action – taking a critical look 203
Refactoring 205
Time for action – defining new entities: how it should look 205
Metaclasses 206
Time for action – using metaclasses 207
MetaEntity and AbstractEntity classes 208
Time for action – implementing the MetaEntity and AbstractEntity classes 209
Relations 217
Time for action – defining new relations: how it should look 217
Implementing the MetaRelation and AbstractRelation classes 219
Adding new methods to existing classes 222
Browsing lists of entities 224
Time for action – using a table-based Entity browser 224
Time for action – examining the HTML markup 229
Caching 232
The books application revisited 236
Time for action – creating a books application, take two 236
Summary 242
Table of Contents
[ v ]
Chapter 8: Managing Customer Relations 243
A critical review 243
Designing a Customer Relationship Management application 244
Time for action – implementing a basic CRM 244
Adding and editing values 248
Time for action – adding an instance 249
Time for action – editing an instance 251
Adding relations 257
Picklists 259
Time for action – implementing picklists 259
Summary 262
Chapter 9: Creating Full-Fledged Webapps: Implementing Instances 263
Even more relations 263
Time for action – showing one-to-many relationships 264
Time for action – adapting MetaRelation 266
Time for action – enhancing Display 270
Time for action – enhancing Browse 271
Access control 274
Time for action – implementing access control 275
Role-based access control 278
Time for action – implementing role-based access control 279
Summary 283
Chapter 10: Customizing the CRM Application 285
Time for action – sorting 285
Time for action – filtering 290
Customization 292
Time for action – customizing entity displays 292
Time for action – customizing entity lists 298
Time for action – adding a delete button 301
Summary 302
Appendix A: References to Resources 303
Good old offline reference books 303
Additional websites, wikis, and blogs 304
Appendix B: Pop Quiz Answers 307
Chapter 2, Creating a Simple Spreadsheet 307
Chapter 3, Tasklist I: Persistence 308
Chapter 4, Tasklist II: Databases and AJAX 309
Chapter 5, Entities and Relations 310
Chapter 6, Building a Wiki 310
Index 311

标签:

实例下载地址

Python 3 Web Development. Beginners Guide.pdf

不能下载?内容有错? 点击这里报错 + 投诉 + 提问

好例子网口号:伸出你的我的手 — 分享

网友评论

发表评论

(您的评论需要经过审核才能显示)

查看所有0条评论>>

小贴士

感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。

  • 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
  • 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
  • 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
  • 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。

关于好例子网

本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明

;
报警