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

« back to all changes in this revision

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

  • Committer: mattgiuca
  • Date: 2008-02-19 07:12:38 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:506
dispatch.__init__, dispatch.request, cgirequest:
    Removed "username" attribute from Request objects altogether.
    Use req.user.login instead.
consoleservice, userservice, fileservice, debuginfo, studpath:
    Replaced use of "req.username" with "req.user.login".
Yay, refactor complete!

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
        ("uri", req.uri),
65
65
        ("app", req.app),
66
66
        ("path", req.path),
67
 
        ("username", req.username),
 
67
        ("user", req.user),
68
68
        ("hostname", req.hostname),
69
69
    ])
 
70
    if req.user is not None:
 
71
        print_table(req, "req.user", dict(req.user).items(), "h4")
70
72
 
71
73
    # Violate encapsulation here to print out the hidden properties
72
74
    print_table(req, "Apache (Hidden) Request Properties", [
84
86
    session = req.get_session()
85
87
    print_table(req, "Session Variables", session.items())
86
88
    if 'user' in session:
87
 
        print_table(req, "User Fields", dict(session['user']).items(),
 
89
        print_table(req, "session['user']", dict(session['user']).items(),
88
90
            "h4")
89
91
 
90
92
    print_table(req, "HTTP Request Headers",