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

« back to all changes in this revision

Viewing changes to lib/conf/apps.py

  • Committer: mattgiuca
  • Date: 2008-02-22 00:47:07 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:538
userservice: Throws METHOD_NOT_ALLOWED on bad method errors instead of BAD
    REQUEST.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
enable_debuginfo = False
8
8
 
9
9
# Allow App objects
10
 
# Notes:
11
 
# desc is a full description for the front page. It isn't required
12
 
# unless this app is in apps_on_home_page.
13
 
# icon is a string of a file basename. The icon files are found in
 
10
# Note: icon is a string of a file basename. The icon files are found in
14
11
# app_icon_dir, defined below.
15
12
class App:
16
 
    def __init__(self, dir, name, desc=None, icon = None,
17
 
        requireauth = True, hashelp = False):
 
13
    def __init__(self, dir, name, icon = None, requireauth = True,
 
14
        hashelp = False):
18
15
        self.dir = dir
19
16
        self.name = name
20
 
        self.desc = desc
21
17
        self.icon = icon
22
18
        self.requireauth = requireauth
23
19
        self.hashelp = hashelp
24
20
    def __repr__(self):
25
 
        return ("App(dir=%s, name=%s, desc=%s, icon=%s, requireauth=%s, "
26
 
                "hashelp=%s)" % (repr(self.dir), repr(self.name),
27
 
                repr(self.desc), repr(self.icon), repr(self.requireauth),
28
 
                repr(self.hashelp)))
 
21
        return ("App(dir=" + repr(self.dir) + ", name=" + repr(self.name) +
 
22
            ", icon=" + repr(self.icon) +
 
23
            ", requireauth=" + repr(self.requireauth) + ", hashelp="
 
24
            + repr(self.hashelp) + ")")
29
25
 
30
26
# Directory where app icons are stored, relative to the IVLE root.
31
27
app_icon_dir = "media/images/apps"
36
32
# of the site). This is the app's URL name.
37
33
# Note that if this app requires authentication, the user will first be
38
34
# presented with the login screen.
39
 
default_app = "home"
 
35
default_app = "files"
40
36
# Which application to use for "public host" URLs.
41
37
# (See conf.py)
42
38
public_app = "serve"
44
40
# Application definitions
45
41
 
46
42
app_browser =   App(dir = "browser",
47
 
                    name = "Files",
48
 
                    desc = "Gives you access to all of your files and lets "
49
 
                           "you download, upload, edit and run them.",
 
43
                    name = "File Browser",
50
44
                    icon = "browser.png",
51
45
                    requireauth = True,
52
46
                    hashelp = True)
53
47
 
 
48
app_editor =   App(dir = "editor",
 
49
                    name = "Text Editor",
 
50
                    icon = "editor.png",
 
51
                    requireauth = True,
 
52
                    hashelp = True)
 
53
 
54
54
app_fileservice = App(dir = "fileservice",
55
55
                    name = "File Service (AJAX server)",
56
56
                    requireauth = True,
58
58
 
59
59
app_console =     App(dir = "console",
60
60
                    name = "Console",
61
 
                    desc = "A Python console where you can try out code "
62
 
                           "without having to save and run it.",
63
61
                    icon = "console.png",
64
62
                    requireauth = True,
65
63
                    hashelp = True)
70
68
                    hashelp = False)
71
69
 
72
70
app_tutorial =     App(dir = "tutorial",
73
 
                    name = "Worksheets",
74
 
                    desc = "Online tutorials and exercises for lab work.",
 
71
                    name = "Tutorial",
75
72
                    icon = "tutorial.png",
76
73
                    requireauth = True,
77
74
                    hashelp = True)
93
90
 
94
91
app_help =      App(dir = "help",
95
92
                    name = "Help",
96
 
                    desc = "IVLE help pages",
97
93
                    icon = "help.png",
98
94
                    requireauth = True,
99
95
                    hashelp = False)
105
101
 
106
102
app_forum = App(dir = "forum",
107
103
                    name = "Forum",
108
 
                    desc = "Discussion boards for material relating to "
109
 
                           "Informatics, IVLE and Python.",
110
104
                    icon = "forum.png",
111
105
                    requireauth = True,
112
106
                    hashelp = False)
116
110
                    requireauth = False,
117
111
                    hashelp = False)
118
112
 
119
 
app_settings = App(dir = "settings",
120
 
                    name = "Account Settings",
121
 
                    icon = "settings.png",
122
 
                    requireauth = True,
123
 
                    hashelp = True)
124
 
 
125
113
app_userservice = App(dir = "userservice",
126
114
                    name = "User Management Service",
127
115
                    requireauth = False,
128
116
                    hashelp = False)
129
117
 
130
 
app_diff = App(dir = "diff",
131
 
                    name = "Diff",
132
 
                    #icon = "forum.png",
133
 
                    requireauth = True,
134
 
                    hashelp = False)
135
 
 
136
 
app_subjects = App(dir = "subjects",
137
 
                    name = "Subjects",
138
 
                    desc = "Announcements and information about the subjects "
139
 
                           "you are enrolled in.",
140
 
                    icon = "subjects.png",
141
 
                    requireauth = False,
142
 
                    hashelp = False)
143
 
 
144
 
app_home = App(dir = "home",
145
 
                    name = "Home",
146
 
                    desc = "IVLE home page",
147
 
                    icon = "home.png",
148
 
                    requireauth = True,
149
 
                    hashelp = False)
150
 
 
151
118
# Mapping URL names to apps
152
119
 
153
120
app_url = {
154
121
    "files" : app_browser,
 
122
    "edit" : app_editor,
155
123
    "fileservice" : app_fileservice,
156
124
    "console" : app_console,
157
125
    "consoleservice" : app_consoleservice,
162
130
    "help" : app_help,
163
131
    "forum" : app_forum,
164
132
    "tos" : app_tos,
165
 
    "settings" : app_settings,
166
133
    "userservice" : app_userservice,
167
 
    "diff" : app_diff,
168
 
    "subjects" : app_subjects,
169
 
    "home" : app_home,
170
134
}
171
135
if enable_debuginfo:
172
136
    app_url["debuginfo"] = app_debuginfo
175
139
# (The others are hidden unless they are linked to)
176
140
# Note: The values in this list are the URL names as seen in app_url.
177
141
 
178
 
apps_in_tabs = ["home", "subjects", "files", "tutorial", "console",
179
 
                "forum", "help"]
180
 
 
181
 
# List of apps that go in the list on the home page
182
 
apps_on_home_page = ["subjects", "files", "tutorial", "console", "forum"]
 
142
apps_in_tabs = ["files", "edit", "console", "tutorial", "forum", "help"]