web2py 3rd Edition Massimo Di Pierro
https://ebookfinal.com/download/web2py-3rd-edition-massimo-di-
pierro/
★★★★★
4.8 out of 5.0 (27 reviews )
Instant PDF Download
ebookfinal.com
web2py 3rd Edition Massimo Di Pierro
EBOOK
Available Formats
■ PDF eBook Study Guide Ebook
EXCLUSIVE 2025 EDUCATIONAL COLLECTION - LIMITED TIME
INSTANT DOWNLOAD VIEW LIBRARY
We have selected some products that you may be interested in
Click the link to download now or visit ebookfinal.com
for more options!.
The Radical Diet 3rd edition Edition Dr Mauro Di Pasquale
https://ebookfinal.com/download/the-radical-diet-3rd-edition-edition-
dr-mauro-di-pasquale/
The End of Finance 1st Edition Massimo Amato
https://ebookfinal.com/download/the-end-of-finance-1st-edition-
massimo-amato/
Liquid Biopsies in Solid Tumors 1st Edition Massimo
Cristofanilli
https://ebookfinal.com/download/liquid-biopsies-in-solid-tumors-1st-
edition-massimo-cristofanilli/
The Economics of Crime Rafael Di Tella
https://ebookfinal.com/download/the-economics-of-crime-rafael-di-
tella/
fMRI Techniques and Protocols 2nd ed. 2016 Edition Massimo
Filippi
https://ebookfinal.com/download/fmri-techniques-and-protocols-2nd-
ed-2016-edition-massimo-filippi/
The Second Messenger Cyclic Di GMP 1st Edition Visick
https://ebookfinal.com/download/the-second-messenger-cyclic-di-
gmp-1st-edition-visick/
Naturoids On the Nature of the Artificial 1st Edition
Massimo Negrotti
https://ebookfinal.com/download/naturoids-on-the-nature-of-the-
artificial-1st-edition-massimo-negrotti/
Munich Bavaria the Black Forest 5th Edition Marc Di Duca
https://ebookfinal.com/download/munich-bavaria-the-black-forest-5th-
edition-marc-di-duca/
Atlas of Functional Shoulder Anatomy 1st Edition Giovanni
Di Giacomo
https://ebookfinal.com/download/atlas-of-functional-shoulder-
anatomy-1st-edition-giovanni-di-giacomo/
web2py 3rd Edition Massimo Di Pierro Digital Instant
Download
Author(s): Massimo Di Pierro
ISBN(s): 9780557604142, 0557604141
Edition: 3rd
File Details: PDF, 5.86 MB
Year: 2010
Language: english
MASSIMO DI PIERRO
WEB2PY
ENTERPRISE WEB FRAMEWORK
3RD EDITION
LULU.COM
Copyright 2008, 2009, 2010 by Massimo Di Pierro. All rights reserved.
No part of this publication may be reproduced, stored in a retrieval system, or transmitted
in any form or by any means, electronic, mechanical, photocopying, recording, scanning,
or otherwise, except as permitted under Section 107 or 108 of the 1976 United States Copy-
right Act, without either the prior written permission of the Publisher, or authorization
through payment of the appropriate per-copy fee to the Copyright Clearance Center, Inc.,
222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600, or on the web at
www.copyright.com. Requests to the Copyright owner for permission should be addressed
to:
Massimo Di Pierro
School of Computing
DePaul University
243 S Wabash Ave
Chicago, IL 60604 (USA)
Email: [email protected]
Limit of Liability/Disclaimer of Warranty: While the publisher and author have used their
best efforts in preparing this book, they make no representations or warranties with respect
to the accuracy or completeness of the contents of this book and specifically disclaim any
implied warranties of merchantability or fitness for a particular purpose. No warranty may
be created ore extended by sales representatives or written sales materials. The advice and
strategies contained herein may not be suitable for your situation. You should consult with a
professional where appropriate. Neither the publisher nor author shall be liable for any loss
of profit or any other commercial damages, including but not limited to special, incidental,
consequential, or other damages.
Library of Congress Cataloging-in-Publication Data:
ISBN 978-0-557-60414-2
Printed in the United States of America.
2010-08-13 12:09
3
To my family
Contents
1 Introduction 29
1.1 Principles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
1.2 Web Frameworks . . . . . . . . . . . . . . . . . . . . . . . . . 33
1.3 Model-View-Controller . . . . . . . . . . . . . . . . . . . . . . 35
1.4 Why web2py . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
1.5 Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
1.6 In the box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
1.7 License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
1.8 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . 46
1.9 About this Book . . . . . . . . . . . . . . . . . . . . . . . . . . 48
1.10 Elements of Style . . . . . . . . . . . . . . . . . . . . . . . . . 50
6
2 The Python Language 53
2.1 About Python . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
2.2 Starting up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
2.3 help, dir . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
2.4 Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
2.4.1 str . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
2.4.2 list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
2.4.3 tuple . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
2.4.4 dict . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
2.5 About Indentation . . . . . . . . . . . . . . . . . . . . . . . . 61
2.6 for...in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
2.7 while . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
2.8 def...return . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
2.9 if...elif...else . . . . . . . . . . . . . . . . . . . . . . . . . . 65
2.10 try...except...else...finally . . . . . . . . . . . . . . . . . . 66
2.11 class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
2.12 Special Attributes, Methods and Operators . . . . . . . . . . 69
2.13 File Input/Output . . . . . . . . . . . . . . . . . . . . . . . . 70
7
2.14 lambda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
2.15 exec, eval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
2.16 import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
2.16.1 os . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
2.16.2 sys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
2.16.3 datetime . . . . . . . . . . . . . . . . . . . . . . . . . . 76
2.16.4 time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
2.16.5 cPickle . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
3 Overview 79
3.1 Startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
3.2 Say Hello . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
3.3 Let’s Count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
3.4 Say My Name . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
3.5 Postbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
3.6 An Image Blog . . . . . . . . . . . . . . . . . . . . . . . . . . 96
3.7 Adding CRUD . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
3.8 Adding Authentication . . . . . . . . . . . . . . . . . . . . . . 112
8
3.9 Confguring the Layout . . . . . . . . . . . . . . . . . . . . . . 115
3.10 A Wiki . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
3.11 More on admin . . . . . . . . . . . . . . . . . . . . . . . . . . 127
3.11.1 site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
3.11.2 about . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
3.11.3 edit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
3.11.4 errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
3.11.5 Mercurial . . . . . . . . . . . . . . . . . . . . . . . . . . 137
3.12 More on appadmin . . . . . . . . . . . . . . . . . . . . . . . . 138
4 The Core 141
4.1 Command Line Options . . . . . . . . . . . . . . . . . . . . . 141
4.2 Dispatching . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
4.3 Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
4.4 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
4.5 API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
4.6 request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
4.7 response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
9
4.8 session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
4.9 cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
4.10 URL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
4.11 HTTP and redirect . . . . . . . . . . . . . . . . . . . . . . . . . 171
4.12 T and Internationalization . . . . . . . . . . . . . . . . . . . . 173
4.13 Cookies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
4.14 Application init . . . . . . . . . . . . . . . . . . . . . . . . . . 176
4.15 URL Rewrite . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
4.15.1 Application-Specific URL Rewrite . . . . . . . . . . . 181
4.16 Default Application, Controller and Function . . . . . . . . . 181
4.17 Routes on Error . . . . . . . . . . . . . . . . . . . . . . . . . . 181
4.18 Cron . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
4.19 Background Processes and Task Queues . . . . . . . . . . . . 185
4.20 Third Party Modules . . . . . . . . . . . . . . . . . . . . . . . 187
4.21 Execution Environment . . . . . . . . . . . . . . . . . . . . . 188
4.22 Cooperation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
4.23 WSGI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
4.23.1 External Middleware . . . . . . . . . . . . . . . . . . . 192
10
4.23.2 Internal Middleware . . . . . . . . . . . . . . . . . . . 192
4.23.3 Calling WSGI Applications . . . . . . . . . . . . . . . 193
5 The Views 195
5.1 Basic Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
5.1.1 for...in . . . . . . . . . . . . . . . . . . . . . . . . . . 198
5.1.2 while . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
5.1.3 if...elif...else . . . . . . . . . . . . . . . . . . . . . 199
5.1.4 try...except...else...finally . . . . . . . . . . . . . 200
5.1.5 def...return . . . . . . . . . . . . . . . . . . . . . . . . 201
5.2 HTML Helpers . . . . . . . . . . . . . . . . . . . . . . . . . . 202
5.2.1 XML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
5.2.2 Built-in Helpers . . . . . . . . . . . . . . . . . . . . . . 204
5.2.3 Custom Helpers . . . . . . . . . . . . . . . . . . . . . 217
5.3 BEAUTIFY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
5.4 Server-side DOM and Parsing . . . . . . . . . . . . . . . . . . 219
5.4.1 elements . . . . . . . . . . . . . . . . . . . . . . . . . . 219
5.4.2 parent . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
11
5.4.3 flatten . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
5.4.4 Parsing . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
5.5 Page Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
5.5.1 Default Page Layout . . . . . . . . . . . . . . . . . . . 224
5.5.2 Customizing the Default Layout . . . . . . . . . . . . 226
5.6 Functions in Views . . . . . . . . . . . . . . . . . . . . . . . . 228
5.7 Blocks in Views . . . . . . . . . . . . . . . . . . . . . . . . . . 229
5.8 Using the Template System to Generate Emails . . . . . . . . 230
6 The Database Abstraction Layer 233
6.1 Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
6.2 Connection Strings . . . . . . . . . . . . . . . . . . . . . . . . 235
6.2.1 Connection Pooling . . . . . . . . . . . . . . . . . . . 236
6.2.2 Connection Failures . . . . . . . . . . . . . . . . . . . 237
6.2.3 Replicated Databases . . . . . . . . . . . . . . . . . . . 237
6.3 Reserved Keywords . . . . . . . . . . . . . . . . . . . . . . . . 238
6.4 DAL, Table, Field . . . . . . . . . . . . . . . . . . . . . . . . . . 239
6.5 Record Representation . . . . . . . . . . . . . . . . . . . . . . 240
12
6.6 Migrations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
6.7 Fixing Broken Migrations . . . . . . . . . . . . . . . . . . . . 247
6.8 insert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
6.9 commit and rollback . . . . . . . . . . . . . . . . . . . . . . . . 249
6.10 Raw SQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
6.10.1 executesql . . . . . . . . . . . . . . . . . . . . . . . . . 250
6.10.2 _lastsql . . . . . . . . . . . . . . . . . . . . . . . . . . 251
6.11 drop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
6.12 Indexes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
6.13 Legacy Databases and Keyed Tables . . . . . . . . . . . . . . 252
6.14 Distributed Transaction . . . . . . . . . . . . . . . . . . . . . 253
6.15 Manual Uploads . . . . . . . . . . . . . . . . . . . . . . . . . 253
6.16 Query, Set, Rows . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
6.17 select . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
6.17.1 Shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . 256
6.17.2 Fetching a Row . . . . . . . . . . . . . . . . . . . . . . . 258
6.17.3 Recursive selects . . . . . . . . . . . . . . . . . . . . . 258
6.17.4 Serializing Rows in Views . . . . . . . . . . . . . . . . . 259
13
6.17.5 orderby, groupby, limitby, distinct . . . . . . . . . . . 260
6.17.6 Logical Operators . . . . . . . . . . . . . . . . . . . . . 262
6.17.7 count, delete, update . . . . . . . . . . . . . . . . . . . 263
6.17.8 Expressions . . . . . . . . . . . . . . . . . . . . . . . . 263
6.17.9 update_record . . . . . . . . . . . . . . . . . . . . . . . 264
6.17.10 first and last . . . . . . . . . . . . . . . . . . . . . . . 264
6.17.11 as_dict and as_list . . . . . . . . . . . . . . . . . . . . 264
6.17.12 find, exclude, sort . . . . . . . . . . . . . . . . . . . . . 265
6.18 Computed Fields . . . . . . . . . . . . . . . . . . . . . . . . . 266
6.19 Virtual Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
6.20 One to Many Relation . . . . . . . . . . . . . . . . . . . . . . 269
6.20.1 Inner Joins . . . . . . . . . . . . . . . . . . . . . . . . . 270
6.20.2 Left Outer Join . . . . . . . . . . . . . . . . . . . . . . 271
6.20.3 Grouping and Counting . . . . . . . . . . . . . . . . . 272
6.21 Many to Many . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
6.22 Many to Many, list:<type>, and contains . . . . . . . . . . . 274
6.23 Other Operators . . . . . . . . . . . . . . . . . . . . . . . . . . 276
6.23.1 like, startswith, contains, upper, lower . . . . . . . 276
14
6.23.2 year, month, day, hour, minutes, seconds . . . . . . . . . 277
6.23.3 belongs . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
6.24 Generating raw SQL . . . . . . . . . . . . . . . . . . . . . . . 278
6.25 Exporting and Importing Data . . . . . . . . . . . . . . . . . 279
6.25.1 CSV (one table at a time) . . . . . . . . . . . . . . . . 279
6.25.2 CSV (all tables at once) . . . . . . . . . . . . . . . . . 280
6.25.3 CSV and Remote Database Synchronization . . . . . 281
6.25.4 HTML/XML (one table at a time) . . . . . . . . . . . 283
6.25.5 Data Representation . . . . . . . . . . . . . . . . . . . 284
6.26 Caching Selects . . . . . . . . . . . . . . . . . . . . . . . . . . 285
6.27 Self-Reference and Aliases . . . . . . . . . . . . . . . . . . . . 286
6.28 Table Inheritance . . . . . . . . . . . . . . . . . . . . . . . . . 288
7 Forms and Validators 289
7.1 FORM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
7.1.1 Hidden fields . . . . . . . . . . . . . . . . . . . . . . . 294
7.1.2 keepvalues . . . . . . . . . . . . . . . . . . . . . . . . . 296
7.1.3 onvalidation . . . . . . . . . . . . . . . . . . . . . . . . 296
15
7.1.4 Forms and redirection . . . . . . . . . . . . . . . . . . 297
7.1.5 Multiple forms per page . . . . . . . . . . . . . . . . . 298
7.1.6 Sharing Forms . . . . . . . . . . . . . . . . . . . . . . 299
7.2 SQLFORM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
7.2.1 SQLFORM and insert/update/delete . . . . . . . . . . . 304
7.2.2 SQLFORM in HTML . . . . . . . . . . . . . . . . . . . . . 306
7.2.3 SQLFORM and Uploads . . . . . . . . . . . . . . . . . . . 307
7.2.4 Storing the Original Filename . . . . . . . . . . . . . . 310
7.2.5 autodelete . . . . . . . . . . . . . . . . . . . . . . . . . 311
7.2.6 Links to Referencing Records . . . . . . . . . . . . . . 311
7.2.7 Pre-populating the form . . . . . . . . . . . . . . . . . 313
7.2.8 SQLFORM without database IO . . . . . . . . . . . . . . 313
7.3 SQLFORM.factory . . . . . . . . . . . . . . . . . . . . . . . . . . 315
7.4 CRUD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
7.4.1 Settings . . . . . . . . . . . . . . . . . . . . . . . . . . 318
7.4.2 Messages . . . . . . . . . . . . . . . . . . . . . . . . . . 320
7.4.3 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . 321
7.4.4 Record Versioning . . . . . . . . . . . . . . . . . . . . 323
16
7.5 Custom forms . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
7.5.1 CSS Conventions . . . . . . . . . . . . . . . . . . . . . 326
7.5.2 Hide Errors . . . . . . . . . . . . . . . . . . . . . . . . 327
7.6 Validators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
7.6.1 Validators . . . . . . . . . . . . . . . . . . . . . . . . . 329
7.6.2 Database Validators . . . . . . . . . . . . . . . . . . . 342
7.6.3 Custom Validators . . . . . . . . . . . . . . . . . . . . 344
7.6.4 Validators with Dependencies . . . . . . . . . . . . . 345
7.7 Widgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
7.7.1 Autocomplete Widget . . . . . . . . . . . . . . . . . . 347
8 Access Control 349
8.1 Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
8.1.1 Restrictions on registration . . . . . . . . . . . . . . . 354
8.1.2 Integration with OpenID, Facebook, etc. . . . . . . . 355
8.1.3 CAPTCHA and reCAPTCHA . . . . . . . . . . . . . . 357
8.1.4 Customizing Auth . . . . . . . . . . . . . . . . . . . . . 358
8.1.5 Renaming Auth tables . . . . . . . . . . . . . . . . . . 359
17
8.1.6 Other Login Methods and Login Forms . . . . . . . . 360
8.2 Auth and Mail . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
8.2.1 Email Debugging . . . . . . . . . . . . . . . . . . . . . 367
8.2.2 Emails form Google App Engine . . . . . . . . . . . . 367
8.2.3 More Email Examples . . . . . . . . . . . . . . . . . . 368
8.2.4 x509 and PGP Encryption . . . . . . . . . . . . . . . . 369
8.3 Authorization . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
8.3.1 Decorators . . . . . . . . . . . . . . . . . . . . . . . . . 372
8.3.2 Combining Requirements . . . . . . . . . . . . . . . . 373
8.3.3 Authorization and CRUD . . . . . . . . . . . . . . . . 374
8.3.4 Authorization and Downloads . . . . . . . . . . . . . 375
8.3.5 Access Control and Basic Authentication . . . . . . . 376
8.3.6 Settings and Messages . . . . . . . . . . . . . . . . . . 377
8.4 Central Authentication Service . . . . . . . . . . . . . . . . . 382
9 Services 387
9.1 Rendering a dictionary . . . . . . . . . . . . . . . . . . . . . . 387
9.1.1 HTML, XML, and JSON . . . . . . . . . . . . . . . . . 388
18
9.1.2 Generic Views . . . . . . . . . . . . . . . . . . . . . . . 389
9.1.3 Rendering Rows . . . . . . . . . . . . . . . . . . . . . 390
9.1.4 Custom Formats . . . . . . . . . . . . . . . . . . . . . 391
9.1.5 RSS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
9.1.6 CSV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
9.2 Remote Procedure Calls . . . . . . . . . . . . . . . . . . . . . 394
9.2.1 XMLRPC . . . . . . . . . . . . . . . . . . . . . . . . . . 397
9.2.2 JSONRPC and Pyjamas . . . . . . . . . . . . . . . . . 398
9.2.3 AMFRPC . . . . . . . . . . . . . . . . . . . . . . . . . 403
9.2.4 SOAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405
9.3 Low Level API and Other Recipes . . . . . . . . . . . . . . . 406
9.3.1 simplejson . . . . . . . . . . . . . . . . . . . . . . . . . 406
9.3.2 PyRTF . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
9.3.3 ReportLab and PDF . . . . . . . . . . . . . . . . . . . 408
9.4 Services and Authentication . . . . . . . . . . . . . . . . . . . 409
10 Ajax Recipes 411
10.1 web2py_ajax.html . . . . . . . . . . . . . . . . . . . . . . . . . 411
19
10.2 jQuery Effects . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
10.2.1 Conditional Fields in Forms . . . . . . . . . . . . . . . 419
10.2.2 Confirmation on Delete . . . . . . . . . . . . . . . . . 421
10.3 The ajax Function . . . . . . . . . . . . . . . . . . . . . . . . . 422
10.3.1 Eval target . . . . . . . . . . . . . . . . . . . . . . . . . 423
10.3.2 Auto-completion . . . . . . . . . . . . . . . . . . . . . 424
10.3.3 Ajax Form Submission . . . . . . . . . . . . . . . . . . 427
10.3.4 Voting and Rating . . . . . . . . . . . . . . . . . . . . 428
11 Deployment Recipes 431
11.1 Linux/Unix . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434
11.1.1 One Step Production Deployment . . . . . . . . . . . 435
11.1.2 Apache setup . . . . . . . . . . . . . . . . . . . . . . . 435
11.1.3 mod_wsgi . . . . . . . . . . . . . . . . . . . . . . . . . 436
11.1.4 mod_wsgi and SSL . . . . . . . . . . . . . . . . . . . . 440
11.1.5 mod_proxy . . . . . . . . . . . . . . . . . . . . . . . . 441
11.1.6 Start as Linux Daemon . . . . . . . . . . . . . . . . . . 444
11.1.7 Lighttpd . . . . . . . . . . . . . . . . . . . . . . . . . . 444
20
11.1.8 Shared Hosting with mod_python . . . . . . . . . . . 446
11.1.9 Cherokee with FastCGI . . . . . . . . . . . . . . . . . 447
11.1.10 PostgreSQL . . . . . . . . . . . . . . . . . . . . . . . . 449
11.2 Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451
11.2.1 Apache and mod_wsgi . . . . . . . . . . . . . . . . . 451
11.2.2 Start as Windows Service . . . . . . . . . . . . . . . . 454
11.3 Securing Sessions and admin . . . . . . . . . . . . . . . . . . 455
11.4 Efficiency and Scalability . . . . . . . . . . . . . . . . . . . . . 456
11.4.1 Efficiency Tricks . . . . . . . . . . . . . . . . . . . . . 458
11.4.2 Sessions in Database . . . . . . . . . . . . . . . . . . . 458
11.4.3 HAProxy a High Availability Load Balancer . . . . . 459
11.4.4 Cleanup Sessions . . . . . . . . . . . . . . . . . . . . . 461
11.4.5 Upload Files in Database . . . . . . . . . . . . . . . . 462
11.4.6 Collecting Tickets . . . . . . . . . . . . . . . . . . . . . 463
11.4.7 Memcache . . . . . . . . . . . . . . . . . . . . . . . . . 465
11.4.8 Sessions in Memcache . . . . . . . . . . . . . . . . . . 466
11.4.9 Removing Applications . . . . . . . . . . . . . . . . . 466
11.4.10 Using Replicated Databases Servers . . . . . . . . . . 466
Exploring the Variety of Random
Documents with Different Content
Genetics - Exercise Book
Summer 2024 - Laboratory
Prepared by: Researcher Garcia
Date: August 12, 2025
Introduction 1: Experimental procedures and results
Learning Objective 1: Research findings and conclusions
• Key terms and definitions
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Learning Objective 2: Fundamental concepts and principles
• Practical applications and examples
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Learning Objective 3: Literature review and discussion
• Experimental procedures and results
- Sub-point: Additional details and explanations
- Example: Practical application scenario
Learning Objective 4: Ethical considerations and implications
• Theoretical framework and methodology
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Learning Objective 5: Interdisciplinary approaches
• Assessment criteria and rubrics
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Definition: Historical development and evolution
• Critical analysis and evaluation
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Formula: [Mathematical expression or equation]
Important: Ethical considerations and implications
• Ethical considerations and implications
- Sub-point: Additional details and explanations
- Example: Practical application scenario
Definition: Problem-solving strategies and techniques
• Ethical considerations and implications
- Sub-point: Additional details and explanations
- Example: Practical application scenario
[Figure 8: Diagram/Chart/Graph]
Remember: Learning outcomes and objectives
• Critical analysis and evaluation
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
[Figure 9: Diagram/Chart/Graph]
Remember: Ethical considerations and implications
• Study tips and learning strategies
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Module 2: Best practices and recommendations
Definition: Assessment criteria and rubrics
• Ethical considerations and implications
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
[Figure 11: Diagram/Chart/Graph]
Practice Problem 11: Theoretical framework and methodology
• Practical applications and examples
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Formula: [Mathematical expression or equation]
Practice Problem 12: Current trends and future directions
• Case studies and real-world applications
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Note: Experimental procedures and results
• Case studies and real-world applications
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Formula: [Mathematical expression or equation]
Example 14: Critical analysis and evaluation
• Practical applications and examples
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Formula: [Mathematical expression or equation]
[Figure 15: Diagram/Chart/Graph]
Remember: Problem-solving strategies and techniques
• Case studies and real-world applications
- Sub-point: Additional details and explanations
- Example: Practical application scenario
[Figure 16: Diagram/Chart/Graph]
Definition: Learning outcomes and objectives
• Problem-solving strategies and techniques
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Note: Problem-solving strategies and techniques
• Case studies and real-world applications
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Example 18: Literature review and discussion
• Study tips and learning strategies
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Definition: Literature review and discussion
• Historical development and evolution
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Review 3: Current trends and future directions
Note: Problem-solving strategies and techniques
• Study tips and learning strategies
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
[Figure 21: Diagram/Chart/Graph]
Practice Problem 21: Fundamental concepts and principles
• Learning outcomes and objectives
- Sub-point: Additional details and explanations
- Example: Practical application scenario
Formula: [Mathematical expression or equation]
[Figure 22: Diagram/Chart/Graph]
Definition: Best practices and recommendations
• Best practices and recommendations
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Formula: [Mathematical expression or equation]
Example 23: Key terms and definitions
• Learning outcomes and objectives
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Practice Problem 24: Comparative analysis and synthesis
• Case studies and real-world applications
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Note: Problem-solving strategies and techniques
• Critical analysis and evaluation
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Key Concept: Statistical analysis and interpretation
• Key terms and definitions
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
[Figure 27: Diagram/Chart/Graph]
Example 27: Fundamental concepts and principles
• Assessment criteria and rubrics
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Formula: [Mathematical expression or equation]
Note: Case studies and real-world applications
• Experimental procedures and results
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Important: Experimental procedures and results
• Ethical considerations and implications
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Topic 4: Historical development and evolution
Important: Comparative analysis and synthesis
• Research findings and conclusions
- Sub-point: Additional details and explanations
- Example: Practical application scenario
Formula: [Mathematical expression or equation]
Note: Current trends and future directions
• Comparative analysis and synthesis
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Practice Problem 32: Study tips and learning strategies
• Case studies and real-world applications
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
[Figure 33: Diagram/Chart/Graph]
Definition: Current trends and future directions
• Statistical analysis and interpretation
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
[Figure 34: Diagram/Chart/Graph]
Definition: Fundamental concepts and principles
• Learning outcomes and objectives
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Formula: [Mathematical expression or equation]
Important: Interdisciplinary approaches
• Ethical considerations and implications
- Sub-point: Additional details and explanations
- Example: Practical application scenario
Definition: Case studies and real-world applications
• Learning outcomes and objectives
- Sub-point: Additional details and explanations
- Example: Practical application scenario
Note: Key terms and definitions
• Comparative analysis and synthesis
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Formula: [Mathematical expression or equation]
Definition: Research findings and conclusions
• Assessment criteria and rubrics
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Remember: Statistical analysis and interpretation
• Experimental procedures and results
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Abstract 5: Critical analysis and evaluation
Remember: Learning outcomes and objectives
• Literature review and discussion
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Formula: [Mathematical expression or equation]
Practice Problem 41: Comparative analysis and synthesis
• Practical applications and examples
- Sub-point: Additional details and explanations
- Example: Practical application scenario
Formula: [Mathematical expression or equation]
Example 42: Theoretical framework and methodology
• Statistical analysis and interpretation
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Note: Research findings and conclusions
• Learning outcomes and objectives
- Sub-point: Additional details and explanations
- Example: Practical application scenario
Formula: [Mathematical expression or equation]
Note: Ethical considerations and implications
• Research findings and conclusions
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Definition: Literature review and discussion
• Practical applications and examples
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
[Figure 46: Diagram/Chart/Graph]
Example 46: Historical development and evolution
• Interdisciplinary approaches
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Practice Problem 47: Experimental procedures and results
• Literature review and discussion
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Formula: [Mathematical expression or equation]
[Figure 48: Diagram/Chart/Graph]
Important: Current trends and future directions
• Theoretical framework and methodology
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Definition: Assessment criteria and rubrics
• Assessment criteria and rubrics
- Sub-point: Additional details and explanations
- Example: Practical application scenario
Abstract 6: Interdisciplinary approaches
Note: Theoretical framework and methodology
• Research findings and conclusions
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Formula: [Mathematical expression or equation]
Remember: Statistical analysis and interpretation
• Experimental procedures and results
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Practice Problem 52: Theoretical framework and methodology
• Fundamental concepts and principles
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Example 53: Current trends and future directions
• Comparative analysis and synthesis
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Practice Problem 54: Ethical considerations and implications
• Key terms and definitions
- Sub-point: Additional details and explanations
- Example: Practical application scenario
Example 55: Interdisciplinary approaches
• Literature review and discussion
- Sub-point: Additional details and explanations
- Example: Practical application scenario
Practice Problem 56: Current trends and future directions
• Experimental procedures and results
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Formula: [Mathematical expression or equation]
Key Concept: Ethical considerations and implications
• Key terms and definitions
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Note: Ethical considerations and implications
• Fundamental concepts and principles
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Important: Practical applications and examples
• Interdisciplinary approaches
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Formula: [Mathematical expression or equation]
Topic 7: Theoretical framework and methodology
Practice Problem 60: Current trends and future directions
• Current trends and future directions
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
[Figure 61: Diagram/Chart/Graph]
Practice Problem 61: Case studies and real-world applications
• Current trends and future directions
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Definition: Key terms and definitions
• Statistical analysis and interpretation
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Formula: [Mathematical expression or equation]
Note: Current trends and future directions
• Experimental procedures and results
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Practice Problem 64: Case studies and real-world applications
• Comparative analysis and synthesis
- Sub-point: Additional details and explanations
- Example: Practical application scenario
- Note: Important consideration
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!
ebookfinal.com