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

« back to all changes in this revision

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

  • Committer: William Grant
  • Date: 2009-07-04 11:51:46 UTC
  • mto: (1294.4.2 ui-the-third)
  • mto: This revision was merged to the branch mainline in revision 1353.
  • Revision ID: grantw@unimelb.edu.au-20090704115146-q6bv2b07g9hcyein
Replace all base view __init__s with one at the root that sets the context.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
    allow_overlays = True
46
46
    overlay_blacklist = []
47
47
 
48
 
    def __init__(self, req, **kwargs):
49
 
        for key in kwargs:
50
 
            setattr(self, key, kwargs[key])
51
 
 
52
48
    def filter(self, stream, ctx):
53
49
        return stream
54
50
 
193
189
class XHTMLErrorView(XHTMLView):
194
190
    template = 'xhtmlerror.html'
195
191
 
196
 
    def __init__(self, req, exception):
197
 
        self.context = exception
198
 
 
199
192
    def populate(self, req, ctx):
 
193
        ctx['req'] = req
200
194
        ctx['exception'] = self.context
201
195
 
202
196
class XHTMLUnauthorizedView(XHTMLErrorView):