1079
by William Grant
Merge setup-refactor branch. This completely breaks existing installations; |
1 |
# IVLE Configuration File
|
2 |
# conf/mimetypes.py
|
|
3 |
# Configuration of mime types
|
|
4 |
# These should not need to be modified by admins unless there are problems
|
|
5 |
# with file type identification.
|
|
6 |
||
7 |
# These settings, in conjunction with Python's mimetypes library,
|
|
8 |
# are used in various apps, including server and fileservice
|
|
9 |
# (and by extension, browser and editor), to determine the mime type of
|
|
10 |
# a given file.
|
|
11 |
||
12 |
# All files served whose mime type cannot be guessed will be served as this
|
|
13 |
# type.
|
|
14 |
default_mimetype = "text/plain" |
|
15 |
||
16 |
# Mapping file extensions to mime types
|
|
17 |
# Note that IVLE uses Python's mimetype library which looks in a bunch of
|
|
18 |
# files such as /etc/mime.types. This section allows you to add new mime types
|
|
19 |
# solely for use in IVLE.
|
|
20 |
# File extensions should include the leading '.'.
|
|
21 |
||
22 |
additional_mime_types = { |
|
23 |
".py" : "text/x-python", # Redundant, but just in case |
|
24 |
".psp" : "text/x-python-server-page", |
|
25 |
".js" : "application/javascript", # Override bad default |
|
26 |
}
|
|
27 |
||
28 |
# Mapping mime types to friendly names
|
|
29 |
||
30 |
nice_mimetypes = { |
|
31 |
"text/x-python" : "Python source code", |
|
32 |
"text/plain" : "Text file", |
|
33 |
"text/html" : "HTML file", |
|
34 |
"image/png" : "PNG image", |
|
35 |
}
|
|
36 |