Index of the wareweb module
-
m
wareweb
...
-
m
funcs
...
- General-(web-)purpose functions for use in your applications.
- f html_quote_whitespace ... - HTML quote a value, and then make sure its whitespace is preserved. If newlines is true, then also turn newlines into <br> -- otherwise just horizontal whitespace will be preserved (using ).
- f url_quote ... - URL quote the value. None becomes the empty string. Dictionaries are mapped to
- f html_quote ... - HTML quote the value. None becomes an empty string. If a value has an __html__ method, that will be called to get the HTML.
-
m
timeinterval
...
- timeinterval
- f time_decode ... - Decodes a number in the format 1h4d3m (1 hour, 3 days, 3 minutes) into a number of seconds
- f time_encode ... - Encodes a number of seconds (representing a time interval) into a form like 1h2d3s.
-
m
create_template
...
-
C
Wareweb
...
- a vars ...
- a use_cheetah ...
- a egg_plugins ...
- a summary ...
- a required_templates ...
- f post ...
-
C
Wareweb
...
-
m
servlet_script
...
-
C
ServletCommand
...
- a min_args ...
- a parser ...
- a group_name ...
- a min_args_error ...
- a takes_config_file ...
- a usage ...
- a max_args_error ...
- a return_code ...
- a summary ...
- a required_args ...
- f create_blank ...
- f command ...
- f create_servlet ...
- f web_dir ...
-
C
ServletCommand
...
-
m
servlet
...
-
C
Servlet
...
- a app_name ...
- a encoding ...
- a session ...
- a html_title ...
- a title ...
- a listeners ...
- a wsgi_application ...
- f respond ...
- f set_header ...
- f title__get ...
- f add_header ...
- f sleep ...
- f forward_to_wsgiapp ... - Forwards the request to the given WSGI application
- f redirect ...
- f title__set ...
- f teardown ...
- f set_cookie ...
- f write ...
- f session__get ...
- f __classinit__ ...
- f __call__ ...
- f awake ...
- f setup ...
- f html_title__get ...
- f add_attr ...
-
C
Servlet
...
-
m
interfaces
...
- Descriptions of the main interfaces in Wareweb. These aren't formal
interfaces, they are just here for documentation purposes.
- C Attribute ...
-
C
IServlet
...
- a app_url ...
- a path_parts ...
- a fields ...
- a title ...
- a session ...
- a environ ...
- a path_info ...
- a config ...
- f redirect ... - Redirects to the given URL. If the URL is relative, then it will be resolved to be absolute with respect to self.app_url.
- f set_header ... - Sets the named header; overwriting any header that previously existed.
- f teardown ... - Resource cleanup at the end of request.
- f respond ... - Called after .awake(), this typically produces the body of the response.
- f write ... - Writes the objects.
- f run ... - 'Runs' the request.
- f __call__ ... - Implementation of the WSGI application interface.
- f awake ... - Called at beginning of request.
- f setup ... - Also called at beginning of requests.
- f sleep ... - Called at the end of a request, to clean up resources.
- m wsgiapp ...
-
m
packing
...
- f unpack_json ... - Unpack a JSON request into a function call, and pack the return value into a JSON response.
- f unpack_xmlrpc ... - Unpacks an XMLRPC request into a function call, and packs the response into a XMLRPC response.
- f unpack ... - Unpacks self.path_parts and self.fields into a function call; this decorator can be used to turn such a method into a zero-argument method that unpacks those arguments.
-
m
dispatch
...
-
C
ActionDispatch
...
- This dispatches to a method based on a URL variable (GET or POST
-- remember that you can also include GET variables in your form's
action even if the form is being POSTed).
- a prefix ...
- f respond_event ...
- f __addtoclass__ ...
- f __init__ ...
- f valid_method ...
- f find_method ...
- f get_method ...
-
C
PathDispatch
...
- This dispatches to a method based on the PATH_INFO. Thus
/path/to/servlet/meth will call the meth method.
- a prefix ...
- f __addtoclass__ ...
- f valid_method ...
- f find_method ...
- f get_method ...
- f public ...
-
C
ActionDispatch
...
- This dispatches to a method based on a URL variable (GET or POST
-- remember that you can also include GET variables in your form's
action even if the form is being POSTed).
- m notify ...
-
m
cgifields
...
-
C
Fields
...
- f getlist ... - Return the named item as a list ([] if name not found, [self[name]] if only one field passed in).
- f __init__ ...
- f __contains__ ...
- f __getitem__ ...
- f itemlist ... - Return a list of (name, [values...]). Like .items(), except all values becomes a list (like .getlist()).
- f __iter__ ...
- C HTTPVariableNotFound ... - Raised when a form variable can't be found. Catching either of HTTPBadRequest or KeyError will work, plus this will turn into a better response when a variable isn't found.
-
C
Fields
...
- m event ...
-
m
cookiewriter
...
- C Cookie ... - Object that represents a cookie meant to be set. This is like the standard Cookie.SimpleCookie object, only slightly nicer -- each cookie object is just one name=value setting, and dates can be given as a few special values ('ONCLOSE', 'NOW', 'NEVER', and timeinterval strings like '1w').
-
m
funcs
...
- General-(web-)purpose functions for use in your applications.