Controllers - BaseController
Description
Pylons BaseController. All other controllers are sub-classed from this super-class.
Properties
- doauth (list)
- A list of methods that require the user to be authenticated.
- opendb (list)
- Instances of open Buzhug databases that need to be closed before issuing the HTTP response.
Methods
None of these methods are directly-accessible to the public (through HTTP request).
- __before__ (args: action)
- Checks whether the requested `action` is authentication-required and if so, whether the user is authenticated. Also modifies mako_lookup.directories if the configuration file specifies a path to a SaWALi external templates directory.
- __after__
- Closes all open Buzhug databases, as listed in the `opendb` property, after acting on the HTTP request.
- __call__
- Pylons-predefined.
- _register_db (args: model)
- Adds an instance of a Buzhug database (model) to `opendb`.
- _set_http_header (header_name, header_value)
- Adds or modifies an HTTP header.
- _set_error_page (status_int, details=None)
- Sets the HTTP Status header according to status_int and responds with the appropriate error page. If `details` is given, adds that to the contents of the error page.
- _set_user_error_page (msg_code)
- For authenticated users. Responds with an error page when a user-initiated process cannot be completed— as with if an author using the Content Management System creates a document whose `name` contains a non-alphanumeric character. `msg_code` is a key in sawali2.lib.strings.Error_Pages whose value is a string that contains the error message.