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

« back to all changes in this revision

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

  • Committer: William Grant
  • Date: 2010-02-23 06:11:58 UTC
  • Revision ID: grantw@unimelb.edu.au-20100223061158-05cqg88387ymjtlj
Redo console CSS, and replace the examples on the help page with something more like the modern console that also doesn't break the real console with ID conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
    """
36
36
    content_type = "application/octet-stream"
37
37
 
38
 
    def __init__(self, req, *args, **kwargs):
39
 
        for key in kwargs:
40
 
            setattr(self, key, kwargs[key])
41
 
 
42
38
    def render(self, req):
43
39
        raise NotImplementedError()
44
40
 
59
55
        if not hasattr(op, '_rest_api_permission'):
60
56
            raise Unauthorized()
61
57
 
62
 
        if op._rest_api_permission not in self.get_permissions(req.user):
 
58
        if (op._rest_api_permission not in
 
59
            self.get_permissions(req.user, req.config)):
63
60
            raise Unauthorized()
64
61
    
65
62
    def convert_bool(self, value):
161
158
    template = None
162
159
    ctx = genshi.template.Context()
163
160
 
164
 
    def __init__(self, req, *args, **kwargs):
165
 
        for key in kwargs:
166
 
            setattr(self, key, kwargs[key])
167
 
    
168
161
    def render_fragment(self):
169
162
        if self.template is None:
170
163
            raise NotImplementedError()