Web.py Cookbook
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.
Formatting
In terms of formatting, please try to use a cookbook-like format...that is:
Problem: You want to access data from database.
Solution: Use this code...
Note that the urls don't need "web" in them -- just "/cookbook/select" , not "/cookbook/web.select".
Finally, this documentation is for version 0.3, so please only add code that you know works with the new version.
Basics:
- Hello World
- Serving Static Files
- Seeother and Redirect
- using subapplications
- Serving XML
Advanced
- web.ctx
- loadhooks/unloadhooks (requested)
- How to properly use web.background (requested)
Sessions and user state:
- Working with Session
- Working with Cookies
- User authentication (requested)
Utils:
Templates:
User Input:
- File Upload
- Accessing user input through web.input
- Using basic forms (requested)
Database:
- Mutliple databases (requested)
- Select: Retrieving entries from a database
- Update (requested)
- Delete (requested)
- Insert: Adding entries to a database
- Query (requested)
- How to use database transactions
Deployment:
- Fastcgi deployment through lighttpd
- Fastcgi deployment through Apache (requested)
- CGI deployment through Apache
- mod_python deployment through Apache (requested)
- nginx deployment (requested)
Subdomains:
- Subdomains and how to access the username (requested)
