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

« back to all changes in this revision

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

ivle.webapp.base.xhtml#XHTMLView: Rename app_template to template (the things
    that use it are views, not apps).

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
        ctx['scripts'] = req.scripts
47
47
        ctx['scripts_init'] = req.scripts_init
48
48
        app_template = os.path.join(os.path.dirname(
49
 
                        inspect.getmodule(self).__file__), self.app_template) 
 
49
                        inspect.getmodule(self).__file__), self.template) 
50
50
        req.write_html_head_foot = False
51
51
        loader = genshi.template.TemplateLoader(".", auto_reload=True)
52
52
        tmpl = loader.load(app_template)
72
72
        for urlname in ivle.conf.apps.apps_in_tabs:
73
73
            new_app = {}
74
74
            app = ivle.conf.apps.app_url[urlname]
75
 
            new_app['this_app'] = urlname == self.appname
 
75
            new_app['this_app'] = hasattr(self, 'appname') \
 
76
                                  and urlname == self.appname
76
77
            if app.icon:
77
78
                new_app['has_icon'] = True
78
79
                icon_dir = ivle.conf.apps.app_icon_dir