Warning
This documentation does not refer to the most recent version of Pylons. Current Documentation
The controllers module is accessible via the pylons module.
Standard Pylons Controller for Web Requests
The Pylons Controller handles incoming web requests that are dispatched from the custom Myghty Routes resolver. These requests result in a new instance of the Controller being created, which is then called with the dict options from the Routes match.
By default, the Controller 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 only exception to the dict is that the Myghty ARGS variable is included.
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 5 members.
WSGI Controller that follows WSGI spec for calling and return values
This function works identically to the normal Controller, however it is called with the WSGI interface, and behaves as a WSGI application calling start_response and returning an iterable as content.
This class contains 5 members.
This class contains 5 members.
See the source for more information.