Logo Search packages:      
Sourcecode: ajaxterm version File versions  Download package

qweb::QWebRequest Class Reference

List of all members.

Detailed Description

QWebRequest a WSGI request handler.

QWebRequest is a WSGI request handler that feature GET, POST and POST
multipart methods, handles cookies and headers and provide a dict-like
SESSION Object (either on the filesystem or in memory).

It is constructed with the environ and start_response WSGI arguments:

  req=qweb.QWebRequest(environ, start_response)

req has the folowing attributes :

  req.environ standard WSGI dict (CGI and wsgi ones)

Some CGI vars as attributes from environ for convenience: 


Some computed value (also for convenience)

  req.FULL_URL full URL recontructed (http://host/query)
  req.FULL_PATH (URL path before ?querystring)

Dict constructed from querystring and POST datas, PHP-like.

  req.GET contains GET vars
  req.POST contains POST vars
  req.REQUEST contains merge of GET and POST
  req.FILES contains uploaded files
  req.GET_LIST req.POST_LIST req.REQUEST_LIST req.FILES_LIST multiple arguments versions
  req.debug() returns an HTML dump of those vars

A dict-like session object.

  req.SESSION the session start when the dict is not empty.

Attribute for handling the response

  req.response_headers dict-like to set headers
  req.response_cookies a SimpleCookie to set cookies
  req.response_status a string to set the status like '200 OK'

  req.write() to write to the buffer

req itselfs is an iterable object with the buffer, it will also also call
start_response automatically before returning anything via the iterator.

To make it short, it means that you may use

  return req

at the end of your request handling to return the reponse to any WSGI
application server.

Definition at line 915 of file qweb.py.

Public Member Functions

def load_post_data

Public Attributes



class  HttpHeaders

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index