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

« back to all changes in this revision

Viewing changes to www/conf/apps.py

  • Committer: mattgiuca
  • Date: 2008-01-09 03:42:54 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:135
dispatch_handler: Fixed exception handler, no longer catches ALL keyerrors in
the entire application suite, only the one intended.
dispatch/html.py: Fixed href links in the tabs at the top - now link to the
URL name of the app, not the dir name (which would be broken if an app had a
different URL name to its dir name).

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
# plugged in.
6
6
 
7
7
# Allow App objects
8
 
# Note: icon is a string of a file basename. The icon files are found in
9
 
# app_icon_dir, defined below.
10
8
class App:
11
 
    def __init__(self, dir, name, icon = None, requireauth = True,
12
 
        hashelp = False):
 
9
    def __init__(self, dir, name, requireauth = True, hashelp = False):
13
10
        self.dir = dir
14
11
        self.name = name
15
 
        self.icon = icon
16
12
        self.requireauth = requireauth
17
13
        self.hashelp = hashelp
18
14
    def __repr__(self):
19
15
        return ("App(dir=" + repr(self.dir) + ", name=" + repr(self.name) +
20
 
            ", icon=" + repr(self.icon) +
21
16
            ", requireauth=" + repr(self.requireauth) + ", hashelp="
22
17
            + repr(self.hashelp) + ")")
23
18
 
24
 
# Directory where app icons are stored, relative to the IVLE root.
25
 
app_icon_dir = "media/images/apps"
26
 
# Small version of icons (16x16, for favicon)
27
 
app_icon_dir_small = "media/images/apps/small"
28
 
 
29
 
# Which application to load by default (if the user navigates to the top level
30
 
# of the site). This is the app's URL name.
31
 
# Note that if this app requires authentication, the user will first be
32
 
# presented with the login screen.
33
 
default_app = "files"
34
 
 
35
19
# Application definitions
36
20
 
37
 
app_browser =   App(dir = "browser",
38
 
                    name = "File Browser",
39
 
                    icon = "browser.png",
40
 
                    requireauth = True,
41
 
                    hashelp = True)
42
 
 
43
 
app_editor =   App(dir = "editor",
44
 
                    name = "Text Editor",
45
 
                    icon = "editor.png",
46
 
                    requireauth = True,
47
 
                    hashelp = True)
48
 
 
49
 
app_fileservice = App(dir = "fileservice",
50
 
                    name = "File Service (AJAX server)",
51
 
                    requireauth = True,
52
 
                    hashelp = False)
53
 
 
54
 
app_console =     App(dir = "console",
55
 
                    name = "Console",
56
 
                    icon = "console.png",
57
 
                    requireauth = True,
58
 
                    hashelp = True)
59
 
 
60
 
app_tutorial =     App(dir = "tutorial",
61
 
                    name = "Tutorial",
62
 
                    icon = "tutorial.png",
 
21
app_dummy =     App(dir = "dummy",
 
22
                    name = "My Dummy App",
63
23
                    requireauth = True,
64
24
                    hashelp = True)
65
25
 
75
35
 
76
36
app_help =      App(dir = "help",
77
37
                    name = "Help",
78
 
                    icon = "help.png",
79
38
                    requireauth = True,
80
39
                    hashelp = False)
81
40
 
87
46
# Mapping URL names to apps
88
47
 
89
48
app_url = {
90
 
    "files" : app_browser,
91
 
    "edit" : app_editor,
92
 
    "fileservice" : app_fileservice,
93
 
    "console" : app_console,
94
 
    "tutorial" : app_tutorial,
 
49
    "dummy" : app_dummy,
95
50
    "serve" : app_server,
96
51
    "download" : app_download,
97
52
    "help" : app_help,
102
57
# (The others are hidden unless they are linked to)
103
58
# Note: The values in this list are the URL names as seen in app_url.
104
59
 
105
 
apps_in_tabs = ["files", "edit", "console", "tutorial", "help"]
 
60
apps_in_tabs = ["dummy", "help"]