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

« back to all changes in this revision

Viewing changes to src/dispatch/__init__.py

  • Committer: mattgiuca
  • Date: 2007-12-12 04:44:16 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:42
Added common/util.py for common functionality.
Moved make_path from dispatch into util.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
 
35
35
from request import Request
36
36
import html
37
 
 
38
 
root_dir = conf.root_dir
 
37
import common.util
 
38
from common.util import make_path
39
39
 
40
40
def handler(req):
41
41
    """Handles a request which may be to anywhere in the site except media.
86
86
 
87
87
    print_apps_list(req)
88
88
 
89
 
def make_path(path):
90
 
    """Given a path relative to the IVLE root, makes the path relative to the
91
 
    site root using conf.root_dir. This path can be used in URLs sent to the
92
 
    client."""
93
 
    return os.path.join(root_dir, path)
94
 
 
95
89
def print_apps_list(file):
96
90
    """Prints all app tabs, as a UL. Prints a list item for each app that has
97
91
    a tab.