Part of canonical.launchpad.webapp View In Hierarchy
Known subclasses: canonical.launchpad.webapp.__init__.LaunchpadFormView
Base class for views in Launchpad.
Available attributes and methods are:
context
request
initialize() <-- subclass this for specific initialization
template <-- the template set from zcml, otherwise not present
user <-- currently logged-in user
many templates not set via zcml, or you want to do rendering from Python.
isBetaUser <-- whether the logged-in user is a beta tester
Method | __init__ | Undocumented |
Method | initialize | Override this in subclasses. |
Method | template | The page's template, if configured in zcml. |
Method | render | Return the body of the response. |
Method | __call__ | Undocumented |
Method | _isRedirected | Return True if a redirect was requested. |
Method | _getErrorMessage | Property getter for error_message . |
Method | _setErrorMessage | Property setter for error_message . |
Method | _getInfoMessage | Property getter for info_message . |
Method | _setInfoMessage | Property setter for info_message . |
Inherited from UserAttributeCache:
Method | account | Undocumented |
Method | user | The logged-in Person, or None if there is no one logged in. |
Method | isBetaUser | Return True if the user is in the beta testers team. |
Default implementation does nothing.
If the mime type of request.response starts with text/, then the result of this method is encoded to the charset of request.response. If there is no charset, it is encoded to utf8. Otherwise, the result of this method is treated as bytes.
XXX: Steve Alexander says this is a convenient lie. That is, its not quite right, but good enough for most uses.
Check if the response status is one of 301, 302, 303 or 307.