Latest Version: 0.9.6.2

core

The core WSGIController


Classes

C Controller(...) ...

Deprecated Pylons Controller for Web Requests

All Pylons projects should use the WSGIController.

This class contains 6 members.

C WSGIController(...) ...

WSGI Controller that follows WSGI spec for calling and return values

The Pylons WSGI Controller handles incoming web requests that are dispatched from the PylonsBaseWSGIApp. These requests result in a new instance of the WSGIController being created, which is then called with the dict options from the Routes match. The standard WSGI response is then returned with start_response called as per the WSGI spec.

By default, the WSGIController will search and attempt to call a __before__ method before calling the action, and will try to call a __after__ method after the action was called. These two methods can act as filters controlling access to the action, setup variables/objects for use with a set of actions, etc.

Each action to be called is inspected with _inspect_call so that it is only passed the arguments in the Routes match dict that it asks for. The arguments passed into the action can be customized by overriding the _get_method_args function which is expected to return a dict.

In the event that an action is not found to handle the request, the Controller will raise an "Action Not Found" error if in debug mode, otherwise a 404 Not Found error will be returned.

This class contains 6 members.

See the source for more information.

Top