Warning
This documentation does not refer to the most recent version of Pylons. Current Documentation
Action decorator that formats output for JSON
Given a function that will return content, this decorator will turn the result into JSON, with a content-type of 'text/javascript' and output it.
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.
This class contains 5 members.
See the source for more information.