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

« back to all changes in this revision

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

  • Committer: Matt Giuca
  • Date: 2009-03-24 03:14:44 UTC
  • mto: This revision was merged to the branch mainline in revision 1322.
  • Revision ID: matt.giuca@gmail.com-20090324031444-dbpn1bj6dr4zh4sx
Added auto-generated (and hand-modified) Sphinx files (conf, Makefile and
    index).
    Our IVLE documentation will be stored as Sphinx files.
    make html to generate the documentation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
        for key in kwargs:
49
49
            setattr(self, key, kwargs[key])
50
50
 
 
51
    def filter(self, stream, ctx):
 
52
        return stream
 
53
 
51
54
    def render(self, req):
52
55
        req.content_type = 'text/html' # TODO: Detect application/xhtml+xml
53
56
 
61
64
                        inspect.getmodule(self).__file__), self.template) 
62
65
        loader = genshi.template.TemplateLoader(".", auto_reload=True)
63
66
        tmpl = loader.load(app_template)
64
 
        app = tmpl.generate(viewctx)
 
67
        app = self.filter(tmpl.generate(viewctx), viewctx)
65
68
 
66
69
        for plugin in self.plugin_scripts:
67
70
            for path in self.plugin_scripts[plugin]:
80
83
        ctx['styles'] += req.styles
81
84
 
82
85
        ctx['scripts'] = [media_url(req, CorePlugin, path) for path in
83
 
                           ('util.js', 'json2.js', 'md5.js', 'jquery.js')]
 
86
                           ('util.js', 'json2.js', 'md5.js')]
 
87
        ctx['scripts'].append(media_url(req, '+external/jquery', 'jquery.js'))
84
88
        ctx['scripts'] += req.scripts
85
89
 
86
90
        ctx['scripts_init'] = req.scripts_init