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

« back to all changes in this revision

Viewing changes to lib/conf/app/server.py

  • Committer: mattgiuca
  • Date: 2008-02-15 04:45:12 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:472
db.py: No longer exceptions if password is not supplied.
makeuser: Converted explicit args into kwargs which are simply forwarded along
    to db. Makeuser db NO LONGER accepts "force" argument (which used to
    delete and replace login rows). This is dangerous, and we have removed the
    delete user functionality altogether - because we never delete users.
makeuser.py (script): Major change. Replaced the command-line interface so it
    now only takes 3 required arguments, and a bunch of optional arguments
    getopts style.
    All the arguments are specified at the top; the rest of the code works
    with these data structures so they are only specified in one place
    (including all the work of putting them into a dict and passing it to the
    database).
    Note that makeuser.py is a *second* point of control for the list of the
    login fields (the other is in db.DB.login_fields_list). This is by design,
    because there is a semantic difference between "what fields are in the db"
    and "what arguments should we accept on the command line".

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# IVLE Configuration File
 
2
# conf/app/server.py
 
3
# Configuration for Server ('serve') app.
 
4
# These should not need to be modified by admins unless new languages become
 
5
# supported.
 
6
 
 
7
# Note that this configuration file uses mime types to identify files.
 
8
# conf/mimetypes.py may need to be modified to configure mime types outside of
 
9
# the system's default mime types.
 
10
 
 
11
# Mapping mime types to interpreters
 
12
# Interpreters are built-in to IVLE, and identified by their string names.
 
13
# Available interpreters are:
 
14
#   cgi-generic
 
15
#       Runs any executable file as a CGI program
 
16
#   cgi-python
 
17
#       Runs a Python script as a CGI program
 
18
#   python-server-page
 
19
#       Runs a Python Server Page (psp) file
 
20
 
 
21
interpreters = {
 
22
    "text/x-python" : "cgi-python",
 
23
    "text/x-python-server-page" : "python-server-page",
 
24
}
 
25
 
 
26
# Non-interpreted files fall back to either being served directly, or
 
27
# returning a 403 Forbidden.
 
28
# This decision can either be made with a blacklist or a whitelist.
 
29
 
 
30
blacklist_served_filetypes = False
 
31
 
 
32
# blacklist_served_filetypes = False causes IVLE to disallow all filetypes by
 
33
# default, and use served_filetypes_whitelist for exceptions.
 
34
# blacklist_served_filetypes = True causes IVLE to allow all filetypes by
 
35
# default, and use served_filetypes_blacklist for exceptions.
 
36
 
 
37
# The whitelist/blacklist dictionaries are sets of mime types to allow or
 
38
# disallow respectively.
 
39
 
 
40
served_filetypes_whitelist = set([
 
41
    "application/ecmascript",
 
42
    "application/octet-stream",
 
43
    "application/pdf",
 
44
    "application/postscript",
 
45
    "application/javascript",
 
46
    "application/json",
 
47
    "application/xhtml+xml",
 
48
    "application/xml",
 
49
    "application/zip",
 
50
 
 
51
    "audio/x-wav",
 
52
    "audio/mpeg",
 
53
    "audio/midi",
 
54
 
 
55
    "image/gif",
 
56
    "image/jpeg",
 
57
    "image/png",
 
58
    "image/svg+xml",
 
59
 
 
60
    "text/css",
 
61
    "text/csv",
 
62
    "text/csv",
 
63
    "text/html",
 
64
    "text/plain",
 
65
    "text/xml",
 
66
])
 
67
 
 
68
served_filetypes_blacklist = set([
 
69
    "application/x-executable",
 
70
])
 
71