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

« back to all changes in this revision

Viewing changes to www/apps/debuginfo/__init__.py

  • Committer: William Grant
  • Date: 2009-01-13 01:36:15 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:1123
Merge setup-refactor branch. This completely breaks existing installations;
every path (both filesystem and Python) has changed. Do not upgrade without
knowing what you are doing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
# a la phpinfo.
24
24
# Important: This application should be removed from a production system.
25
25
 
26
 
from common import util
27
 
import conf
28
 
from conf import apps
29
26
import os
30
27
 
 
28
from ivle import util
 
29
import ivle.conf
 
30
 
31
31
def handle(req):
32
32
    """Handler for the Debug Information application."""
33
33
 
40
40
    req.write("<h2>IVLE Debug Information</h2>\n")
41
41
 
42
42
    print_table(req, "System Constants", [
43
 
        ("ivle_version", conf.ivle_version),
44
 
        ("ivle_install_dir", conf.ivle_install_dir),
45
 
        ("root_dir", conf.root_dir),
46
 
        ("public_host", conf.public_host),
47
 
        ("jail_base", conf.jail_base),
48
 
        ("default_app", conf.apps.default_app),
49
 
        ("public_app", conf.apps.public_app),
 
43
        ("ivle_version", ivle.conf.ivle_version),
 
44
        ("prefix", ivle.conf.prefix),
 
45
        ("python_site_packages", ivle.conf.python_site_packages),
 
46
        ("data_path", ivle.conf.data_path),
 
47
        ("log_path", ivle.conf.log_path),
 
48
        ("root_dir", ivle.conf.root_dir),
 
49
        ("public_host", ivle.conf.public_host),
 
50
        ("jail_base", ivle.conf.jail_base),
 
51
        ("default_app", ivle.conf.apps.default_app),
 
52
        ("public_app", ivle.conf.apps.public_app),
50
53
    ])
51
54
 
52
55
    print_table(req, "Operating System Variables", [
57
60
        ("uname", os.uname()),
58
61
    ])
59
62
 
60
 
    print_table(req, "Available Applications", conf.apps.app_url.items())
 
63
    print_table(req, "Available Applications", ivle.conf.apps.app_url.items())
61
64
 
62
65
    print_table(req, "Request Properties", [
63
66
        ("method", req.method),
98
101
    req.write("<h3>Removal instructions</h3>\n")
99
102
    req.write("""<p>In a production environment, debuginfo should be disabled.
100
103
    To do this, comment out or remove the debuginfo line of the app_url
101
 
    dictionary in conf/apps.py.</p>
 
104
    dictionary in ivle/conf/apps.py.</p>
102
105
    <p>For extra security, it may be removed completely by deleting the
103
106
    apps/debuginfo directory.</p>
104
107
</div>