milla.app

Module milla.app

Please give me a docstring!

Created:Mar 26, 2011
Author:dustin
Updated:$Date$
Updater:$Author$
class milla.app.Application(obj)[source]

Represents a Milla web application

Constructing an Application instance needs a dispatcher, or alternatively, a root object that will be passed to a new milla.dispatch.traversal.Traverser.

Parameters:obj – An object implementing the dispatcher protocol, or an object to be used as the root for a Traverser

Application instances are WSGI applications.

config

A mapping of configuration settings. For each request, the configuration is copied and assigned to request.config.

handle_error(request)[source]

Handle errors raised by controller callables

Subclasses can override this method to customize the error handling behavior of applications. The default implementation only handles WSGIHTTPException exceptions, by calling them as WSGI applications

make_request(environ)[source]

Create a Request from a WSGI environment

Parameters:environ – WSGI environment dictionary
Returns:milla.Request object for this request
resolve_path(path_info)[source]

Find the controller for a given path

Parameters:path_info – The request path, relative to the application
Returns:Controller callable

If no controller could be resolved for the path, a function that raises HTTPNotFound will be returned.