~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-04-22 04:56:58 UTC
  • Revision ID: matt.giuca@gmail.com-20090422045658-nnfepg0902n3mwtq
ivle.makeuser: Fixed odd code which would create the home directory, then
    immediately clobber it by restoring the backup.
    This broke in Python 2.6 because the behaviour of shutil.move changed.
    (Commented).

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
from ivle.webapp.base.views import BaseView
29
29
from ivle.webapp.base.plugins import ViewPlugin, OverlayPlugin
30
30
from ivle.webapp.errors import HTTPError, Unauthorized
 
31
import ivle.conf
 
32
import ivle.util
31
33
 
32
34
class XHTMLView(BaseView):
33
35
    """
99
101
 
100
102
    def populate_headings(self, req, ctx):
101
103
        ctx['favicon'] = None
102
 
        ctx['root_dir'] = req.config['urls']['root']
103
 
        ctx['public_host'] = req.config['urls']['public_host']
104
 
        ctx['svn_base'] = req.config['urls']['svn_addr']
 
104
        ctx['root_dir'] = ivle.conf.root_dir
 
105
        ctx['public_host'] = ivle.conf.public_host
 
106
        ctx['svn_base'] = ivle.conf.svn_addr
105
107
        ctx['write_javascript_settings'] = req.write_javascript_settings
106
108
        if req.user:
107
109
            ctx['login'] = req.user.login
134
136
                        ctx['favicon'] = icon_url
135
137
                else:
136
138
                    new_app['has_icon'] = False
137
 
                new_app['path'] = req.make_path(tab[4])
 
139
                new_app['path'] = ivle.util.make_path(tab[4])
138
140
                new_app['desc'] = tab[2]
139
141
                new_app['name'] = tab[1]
140
142
                new_app['weight'] = tab[5]