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

« back to all changes in this revision

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

  • Committer: mattgiuca
  • Date: 2007-12-21 06:15:19 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:124
dispatch/request: Added new fields: method and username.
                  Added new methods: get_session and get_fieldstorage.
dispatch/html: Writes out username of logged in user, and a "logout" link.
dispatch/__init__: Handles special logout app.
                   Performs authentication, and stores username in req.
                   No longer lets apache print HTML errors. Just returns OK.
dispatch: Added login module.

Added new package: auth (handles authentication and authorization).
    Currently just does hard-coded dummy authentication.

debuginfo: Added new info for new fields of request, and also prints out
        fieldstorage and session information.

conf/apps.py: debuginfo does not require auth (careful!)
              Commented out debuginfo (no longer displays warning)

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
    print_table(req, "Available Applications", conf.apps.app_url.items())
56
56
 
57
57
    print_table(req, "Request Properties", [
 
58
        ("method", req.method),
58
59
        ("uri", req.uri),
59
60
        ("app", req.app),
60
61
        ("path", req.path),
 
62
        ("username", req.username),
61
63
    ])
62
64
 
63
65
    # Violate encapsulation here to print out the hidden properties
71
73
        ("path_info", req.apache_req.path_info),
72
74
    ])
73
75
 
 
76
    print_table(req, "Field Storage", req.get_fieldstorage().items())
 
77
    print_table(req, "Session Variables", req.get_session().items())
 
78
 
74
79
    print_table(req, "HTTP Request Headers",
75
80
        req.apache_req.headers_in.items())
76
81
    req.apache_req.add_common_vars()