Django

Code

Ticket #1339 (closed: fixed)

Opened 3 years ago

Last modified 2 years ago

SessionWrapper doesn't have enough dictionary goodness

Reported by: anonymous Assigned to: adrian
Milestone: Component: Core framework
Version: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

sessions.diff (502 bytes) - added by ned@nedbatchelder.com on 02/10/06 09:40:11.
Patch to sessions.py

Change History

02/10/06 09:40:11 changed by ned@nedbatchelder.com

  • attachment sessions.diff added.

Patch to sessions.py

02/10/06 15:33:09 changed by adrian

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #1339 (SessionWrapper doesn't have enough dictionary goodness)




Change Properties
Action