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

« back to all changes in this revision

Viewing changes to www/apps/help/__init__.py

  • Committer: William Grant
  • Date: 2009-01-13 01:36:15 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:1123
Merge setup-refactor branch. This completely breaks existing installations;
every path (both filesystem and Python) has changed. Do not upgrade without
knowing what you are doing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
# This is an IVLE application.
23
23
# A sample / testing application for IVLE.
24
24
 
25
 
from common import util
26
25
import os
27
26
import copy
28
 
import conf
29
 
from conf import apps
 
27
 
 
28
from ivle import util
 
29
import ivle.conf
30
30
 
31
31
# TODO: Nicer 404 errors
32
32
 
38
38
        show_help_menu(req)
39
39
    else:
40
40
        # app must be valid and have help available
41
 
        if appurl not in conf.apps.app_url:
 
41
        if appurl not in ivle.conf.apps.app_url:
42
42
            req.throw_error(req.HTTP_NOT_FOUND)
43
 
        app = conf.apps.app_url[appurl]
 
43
        app = ivle.conf.apps.app_url[appurl]
44
44
        if not app.hashelp:
45
45
            req.throw_error(req.HTTP_NOT_FOUND)
46
46
        # subpath must be empty, for now, as there is only one help file per app
62
62
    # Write a list of links to all apps with help modules
63
63
    req.write("<ul>\n")
64
64
    # Tab apps, in order of tabs
65
 
    for appurl in conf.apps.apps_in_tabs:
66
 
        app = conf.apps.app_url[appurl]
 
65
    for appurl in ivle.conf.apps.apps_in_tabs:
 
66
        app = ivle.conf.apps.app_url[appurl]
67
67
        if app.hashelp:
68
68
            req.write('  <li><a href="%s">%s</a></li>\n'
69
69
                % (os.path.join(util.make_path("help"), appurl), app.name))