~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/base/plugins.py

Add support for custom error views. Plugins can now declare that errors
occuring in a view class or its subclasses should be passed into another view.

We start with an XHTMLErrorView used to render errors in XHTMLViews.

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
    deleted on logout.
52
52
    """
53
53
    pass
 
54
 
 
55
class ErrorPlugin(BasePlugin):
 
56
    """Marker class for plugins which provide views for errors.
 
57
 
 
58
    Error plugins provide an 'error_plugins' dict mapping view classes to
 
59
    error views classes. Whenever an error occurs in a view, the first error
 
60
    view class matching the view class or its bases is used.
 
61
    """
 
62
    pass