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