Opened 19 years ago

Closed 19 years ago

Last modified 18 years ago

#1339 closed enhancement (fixed)

SessionWrapper doesn't have enough dictionary goodness

Reported by: anonymous Owned by: Adrian Holovaty
Component: Core (Other) Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

For some debugging middleware, I'd like to dump the session data. But though request.session is described as "a dictionary-like object", it doesn't have a keys() or items() method that could be used to access all of the session data without know upfront what keys to expect.

The attached patch adds these methods.

Attachments (1)

sessions.diff (502 bytes ) - added by ned@… 19 years ago.
Patch to sessions.py

Download all attachments as: .zip

Change History (2)

by ned@…, 19 years ago

Attachment: sessions.diff added

Patch to sessions.py

comment:1 by Adrian Holovaty, 19 years ago

Resolution: fixed
Status: newclosed

(In [2300]) Fixed #1339 -- Added keys() and items() methods to session objects. Thanks, Ned Batchelder

Note: See TracTickets for help on using tickets.
Back to Top