Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 109 lines (86 sloc) 4.463 kB
4d5dc74 @anandology web.py cookbook
anandology authored
1 ---
2 layout: default
3 title: Web.py Cookbook
4 ---
5
6 # Web.py Cookbook
7
51ddaff @ohsc edit
ohsc authored
8 ##
5b3b9a8 @ohsc edit
ohsc authored
9 * [日本語](/cookbook/ja)
10 * [简体中文](/cookbook/zh-cn)
4d5dc74 @anandology web.py cookbook
anandology authored
11
51ddaff @ohsc edit
ohsc authored
12 Cookbook style documentation for web.py 0.3. Note that some of these features aren't available in previous versions. Currently version 0.3 is the development branch.
13
8ff29a8 @irrelative edit
irrelative authored
14 #Formatting
15
a75708f @irrelative editing formatting
irrelative authored
16 1. In terms of formatting, please try to use a cookbook-like format...that is:
17
18 ###Problem: You want to access data from database.
19
20 ###Solution: Use this code...
ccd87cb @irrelative edit
irrelative authored
21
a75708f @irrelative editing formatting
irrelative authored
22 1. Note that the urls don't need "web" in them -- just "/cookbook/select" , not "/cookbook/web.select".
ccd87cb @irrelative edit
irrelative authored
23
a75708f @irrelative editing formatting
irrelative authored
24 1. Finally, this documentation is for version 0.3, so please only add code that you know works with the new version.
ccd87cb @irrelative edit
irrelative authored
25
8ff29a8 @irrelative edit
irrelative authored
26 -------------------------------------------------
27
289de3b @irrelative Breaking cookbook into topics
irrelative authored
28 ##Basics:
4d5dc74 @anandology web.py cookbook
anandology authored
29 * [Hello World](/cookbook/helloworld)
759d6a6 @irrelative remove spam link, fix absolute link
irrelative authored
30 * [Serving Static Files](/cookbook/staticfiles)
8e2a27d @xrfang Added an entry: url_handling
xrfang authored
31 * [Understanding URL handling](/cookbook/url_handling)
289de3b @irrelative Breaking cookbook into topics
irrelative authored
32 * [Seeother and Redirect](/cookbook/redirect+seeother)
935a794 @aaronsw edit
aaronsw authored
33 * [using subapplications](/cookbook/subapp)
7cee105 @irrelative fix xml link
irrelative authored
34 * [Serving XML](/cookbook/xmlfiles)
e0e5c7a @irrelative fix link typo
irrelative authored
35 * [Reading raw data from post](/cookbook/postbasic)
1ed9791 edit
Cai Xiao authored
36
e704350 @irrelative edit
irrelative authored
37
38 ##Advanced
289de3b @irrelative Breaking cookbook into topics
irrelative authored
39 * [web.ctx](/cookbook/ctx)
8bdb817 @anandology application_processors
anandology authored
40 * [Application processors, loadhooks and unloadhooks](/cookbook/application_processors)
2e6dd95 @harryf like to cookbook/background
harryf authored
41 * [How to use web.background](/cookbook/background)
8dc59d2 @anandology custom not found message
anandology authored
42 * [Custom NotFound message](/cookbook/custom_notfound)
3ba2a96 @dublo7 Added link to streaming example place holder
dublo7 authored
43 * [How to Stream Large Files](/cookbook/streaming_large_files)
d2a6ef7 @harryf add pointer at Control over logging for default HTTPServer
harryf authored
44 * [Control over logging for default HTTPServer](/cookbook/logging)
976d4e2 @danigm edit
danigm authored
45 * [SSL support in built-in cherrypy server](/cookbook/ssl)
b34ecd2 Add new item: Run-time language switch.
Bibby authored
46 * [Run-time language switch](/cookbook/runtime-language-switch)
a8074b8 @anandology edit
anandology authored
47
6f98543 @irrelative edit
irrelative authored
48 ##Sessions and user state:
0e61a8a @anandology edit
anandology authored
49 * [Working with Session](/cookbook/sessions)
c83d494 @anandology edit
anandology authored
50 * [Using session with reloader](/cookbook/session_with_reloader)
4b1ede2 @xrfang Added an entry: session_in_template
xrfang authored
51 * [Using session in template](/cookbook/session_in_template)
6f98543 @irrelative edit
irrelative authored
52 * [Working with Cookies](/cookbook/cookies)
2b67fa8 edit
Ephedrax authored
53 * [User authentication](/cookbook/userauth)
54 * [User authentication with Postgresql database](/cookbook/userauthpgsql)
4705783 @cowmix edit
cowmix authored
55 * [Sessions with sub-apps](/cookbook/sessions_with_subapp)
56
289de3b @irrelative Breaking cookbook into topics
irrelative authored
57
58 ##Utils:
4d5dc74 @anandology web.py cookbook
anandology authored
59 * [Sending Mail](/cookbook/sendmail)
7084952 @anandology edit
anandology authored
60 * [Sending Mail Using Gmail](/cookbook/sendmail_using_gmail)
49d93a9 edit
Gustavo Andrés Angulo authored
61 * [Webservice using soaplib + WSDL](/cookbook/webservice)
289de3b @irrelative Breaking cookbook into topics
irrelative authored
62
63 ##Templates:
759d6a6 @irrelative remove spam link, fix absolute link
irrelative authored
64 * [Templetor: The web.py templating system](/docs/0.3/templetor )
4d5dc74 @anandology web.py cookbook
anandology authored
65 * [Using Site Layout Templates](/cookbook/layout_template)
c64aec8 @angelo-xx edit
angelo-xx authored
66 * [Alternating Style](/cookbook/alternating_style)
8167f90 @xrfang Added: template_import
xrfang authored
67 * [Import functions into templates](/cookbook/template_import)
903fb0b edit
Bibby authored
68 * [i18n support in template file](/cookbook/i18n_support_in_template_file )
29996ac Add article entry: * [[cookbook/template_mako|Use Mako template engin…
Bibby authored
69 * [Use Mako template engine in webpy](/cookbook/template_mako)
99f58e7 edit
Bibby authored
70 * [Use Cheetah template engine in webpy](/cookbook/template_cheetah)
59b9bea edit
Bibby authored
71 * [Use Jinja2 template engine in webpy](/cookbook/template_jinja)
55d6851 @anandology How to use templates on GAE
anandology authored
72 * [How to use templates on Google App Engine](/cookbook/templates_on_gae)
289de3b @irrelative Breaking cookbook into topics
irrelative authored
73
22fdeb4 @arowla Added link to new testing recipe
arowla authored
74 ##Testing:
75 * [Testing with Paste and Nose](/cookbook/testing_with_paste_and_nose)
b3c85fb added testing -> doctest
anonymous authored
76 * [RESTful doctesting using an application's request method](/cookbook/restful_doctesting_using_request)
22fdeb4 @arowla Added link to new testing recipe
arowla authored
77
289de3b @irrelative Breaking cookbook into topics
irrelative authored
78 ##User Input:
b1a14df @irrelative Adding fileupload recipe
irrelative authored
79 * [File Upload](/cookbook/fileupload)
b367fc2 added "store upload"
Enfenion authored
80 * [Store an uploaded file](/cookbook/storeupload)
8cb8150 @anandology edit
anandology authored
81 * [How to put a limit of size of uploaded files](/cookbook/limiting_upload_size)
768ca94 @irrelative edit
irrelative authored
82 * [Accessing user input through web.input](/cookbook/input)
ef2bf4e @anandology add "how to use forms"
anandology authored
83 * [How to use forms](/cookbook/forms)
4d824db edit
foxbunny authored
84 * [Render individual form fields](/cookbook/form_fields)
768ca94 @irrelative edit
irrelative authored
85
289de3b @irrelative Breaking cookbook into topics
irrelative authored
86 ##Database:
bf72085 @lifeeth Fixed a typo in the spelling of multiple
lifeeth authored
87 * [Multiple databases](/cookbook/multidbs)
8f48766 @irrelative edit
irrelative authored
88 * [Select: Retrieving entries from a database](/cookbook/select)
367fc8f @irrelative edit
irrelative authored
89 * [Update: Updating entries in a database](/cookbook/update)
adcfdc8 @irrelative adding delete link
irrelative authored
90 * [Delete: Remove entries in a database](/cookbook/delete)
66c4a4a Move /insert link to /cookbook/insert link to respect tree hierarchy
nux authored
91 * [Insert: Adding entries to a database](/cookbook/insert)
a7bf0ea @irrelative edit
irrelative authored
92 * [Query: Advanced database queries](/cookbook/query)
87f7226 @anandology How to use database transactions
anandology authored
93 * [How to use database transactions](/cookbook/transactions)
f1a75d5 @brentp edit
brentp authored
94 * [Using sqlalchemy](/cookbook/sqlalchemy)
eeb18a9 @tzuryby /cookbook/sqlite-udf
tzuryby authored
95 * [Integrating SQLite UDF (user-defined-functions) with webpy database layer](/cookbook/sqlite-udf)
5d48bea Added the 'where_dict' page to TOC
foxbunny authored
96 * [Using a dictionary as where clause](/cookbook/where_dict)
eeb18a9 @tzuryby /cookbook/sqlite-udf
tzuryby authored
97
289de3b @irrelative Breaking cookbook into topics
irrelative authored
98
422b0f2 @irrelative edit
irrelative authored
99 ##Deployment:
a1311ad @tzuryby edit
tzuryby authored
100 * [Fastcgi deployment through lighttpd](/cookbook/fastcgi-lighttpd)
fedd55d @btipling typo
btipling authored
101 * [Fastcgi deployment through Apache](/cookbook/fastcgi-apache)
02f980f @ivoras link to cgi on apache
ivoras authored
102 * [CGI deployment through Apache](/cookbook/cgi-apache)
e704350 @irrelative edit
irrelative authored
103 * mod_python deployment through Apache (requested)
30b3a34 edit
Bibby authored
104 * [mod_wsgi deployment through Apache](/cookbook/mod_wsgi-apache )
d07c511 edit
enry authored
105 * [mod_wsgi deployment through Nginx](/cookbook/mod_wsgi-nginx )
ffa76a7 Added Fastcgi deployment for Nginx.
Frank authored
106 * [Fastcgi deployment through Nginx](/cookbook/fastcgi-nginx)
289de3b @irrelative Breaking cookbook into topics
irrelative authored
107
7cae081 edit
r authored
108 ##Subdomains:
ffa76a7 Added Fastcgi deployment for Nginx.
Frank authored
109 * Subdomains and how to access the username (requested)
Something went wrong with that request. Please try again.