Code

Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#1339 closed enhancement (fixed)

SessionWrapper doesn't have enough dictionary goodness

Reported by: anonymous Owned by: adrian
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: UI/UX:

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@… 8 years ago.
Patch to sessions.py

Download all attachments as: .zip

Change History (2)

Changed 8 years ago by ned@…

Patch to sessions.py

comment:1 Changed 8 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.