Skip to content
Browse files

cleanup cookbook

  • Loading branch information...
1 parent bf3a78b commit 42dfdb2a10328d286c70bd26b554a03ad4fe06f2 @aaronsw aaronsw committed Jan 24, 2011
View
17 cookbok/postbasic.md
@@ -1,17 +0,0 @@
----
-layout: default
-title: Reading raw data from post
----
-
-# Reading raw data from post
-
-## Introduction
-
-Sometimes, the client send a lot of data by post method. In webpy, you can handle it like this.
-
-
-## Code
-
- class RequestHandler():
- def POST():
- data = web.data() # you can get data use this method
View
43 cookbok/xmlfiles.md
@@ -1,43 +0,0 @@
----
-layout: default
-title: Serving XML
----
-
-# Serving XML
-
-### Problem
-
-How to serve XML files correctly?
-
-This is needed when you have a third-party application posting data to your service and expecting some kind of XML response.
-
-### Solution
-
-Create your XML template with the XML file you want to serve (i.e. response.xml). If the XML has any variables, use the corresponding web.py templating code. This is just an example:
-
- $def with (code)
- <?xml version="1.0"?>
- <RequestNotification-Response>
- <Status>$code</Status>
- </RequestNotification-Response>
-
-To serve this file, create a standard Web.Py program (i.e. response.py) and use the following code. Be aware that you should use <code>web.header('Content-Type', 'text/xml')</code> to tell the client that you are sending a XML file. (You don't need to set the header explicitly for XML files if your template file has the ``.xml`` extension.)
-
-
- import web
-
- render = web.template.render('templates/', cache=False)
-
- urls = (
- '/(.*)', 'index'
- )
-
- app = web.application(urls, globals())
-
- class index:
- def GET(self, code):
- web.header('Content-Type', 'text/xml')
- return render.index(code)
-
- web.webapi.internalerror = web.debugerror
- if __name__ == '__main__': app.run()
View
0 cookbook.ru/helloworld.md → cookbook/helloworld.ru.md
File renamed without changes.
View
0 cookbook.fr.md → cookbook/index.fr.md
File renamed without changes.
View
0 cookbook.ja.md → cookbook/index.ja.md
File renamed without changes.
View
39 cookbook/index.md
@@ -5,25 +5,9 @@ title: Web.py Cookbook
# Web.py Cookbook
-Other languages :[chinese 简体中文](/cookbook/zh-cn) | [japan 日本語](/cookbook/ja) | [français](/cookbook/fr) | ...
+_Other languages:_ [简体中文](/cookbook/index.zh-cn) | [日本語](/cookbook/index.ja) | [Français](/cookbook/index.fr)
-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
-
-1. 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...
-
-1. Note that the urls don't need "web" in them -- just "/cookbook/select" , not "/cookbook/web.select".
-
-1. Finally, this documentation is for version 0.3, so please only add code that you know works with the new version.
-
--------------------------------------------------
-
-##Basics:
+## Basics
* [Hello World](/cookbook/helloworld)
* [Serving Static Files](/cookbook/staticfiles)
* [Understanding URL handling](/cookbook/url_handling)
@@ -32,8 +16,7 @@ Cookbook style documentation for web.py 0.3. Note that some of these features ar
* [Serving XML](/cookbook/xmlfiles)
* [Reading raw data from post](/cookbook/postbasic)
-
-##Advanced
+## Advanced
* [Contextual and Environment variables - web.ctx](/cookbook/ctx)
* [Application processors, loadhooks and unloadhooks](/cookbook/application_processors)
* [How to use web.background](/cookbook/background)
@@ -43,7 +26,7 @@ Cookbook style documentation for web.py 0.3. Note that some of these features ar
* [SSL support in built-in cherrypy server](/cookbook/ssl)
* [Run-time language switch](/cookbook/runtime-language-switch)
-##Sessions and user state:
+## Sessions and user state
* [Working with Session](/cookbook/sessions)
* [Using session with reloader](/cookbook/session_with_reloader)
* [Using session in template](/cookbook/session_in_template)
@@ -54,12 +37,12 @@ Cookbook style documentation for web.py 0.3. Note that some of these features ar
* [Sessions with sub-apps](/cookbook/sessions_with_subapp)
* [Unpack session stored in postgresql](/cookbook/unpack_postgres_session)
-##Utils:
+## Utils
* [Sending Mail](/cookbook/sendmail)
* [Sending Mail Using Gmail](/cookbook/sendmail_using_gmail)
* [Webservice using soaplib + WSDL](/cookbook/webservice)
-##Templates:
+## Templates
* [Templetor: The web.py templating system](/docs/0.3/templetor )
* [Using Site Layout Templates](/cookbook/layout_template)
* [Alternating Style](/cookbook/alternating_style)
@@ -71,19 +54,19 @@ Cookbook style documentation for web.py 0.3. Note that some of these features ar
* [How to use templates on Google App Engine](/cookbook/templates_on_gae)
* [Concatenate two rendered templates](/cookbook/concatenate_two_rendered_templates)
-##Testing:
+## Testing
* [Testing with Paste and Nose](/cookbook/testing_with_paste_and_nose)
* [RESTful doctesting using an application's request method](/cookbook/restful_doctesting_using_request)
-##User Input:
+## User input
* [File Upload](/cookbook/fileupload)
* [Store an uploaded file](/cookbook/storeupload)
* [How to put a limit of size of uploaded files](/cookbook/limiting_upload_size)
* [Accessing user input through web.input](/cookbook/input)
* [How to use forms](/cookbook/forms)
* [Render individual form fields](/cookbook/form_fields)
-##Database:
+## Databases
* [Multiple databases](/cookbook/multidbs)
* [Select: Retrieving entries from a database](/cookbook/select)
* [Update: Updating entries in a database](/cookbook/update)
@@ -96,7 +79,7 @@ Cookbook style documentation for web.py 0.3. Note that some of these features ar
* [Using a dictionary as where clause](/cookbook/where_dict)
-##Deployment:
+## Deployment
* [Fastcgi deployment through lighttpd](/cookbook/fastcgi-lighttpd)
* [Fastcgi deployment through Apache](/cookbook/fastcgi-apache)
* [CGI deployment through Apache](/cookbook/cgi-apache)
@@ -105,5 +88,5 @@ Cookbook style documentation for web.py 0.3. Note that some of these features ar
* [mod_wsgi deployment through Nginx](/cookbook/mod_wsgi-nginx )
* [Fastcgi deployment through Nginx](/cookbook/fastcgi-nginx)
-##Subdomains:
+## Subdomains
* Subdomains and how to access the username (requested)
View
0 cookbook.zh-cn.md → cookbook/index.zh-cn.md
File renamed without changes.

0 comments on commit 42dfdb2

Please sign in to comment.
Something went wrong with that request. Please try again.