Opened 7 years ago

Closed 7 years ago

#5266 closed (invalid)

for k in request.session gives me a key error

Reported by: julian Owned by: jacob
Component: Uncategorized Version: master
Severity: Keywords: session, key error
Cc: jumo@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:



i am storing a few thenks in my session. after doing this and that i want to delete all the stuff stored in the session, not calling each key explicitly, so i do:

for k in request.session:

del request.session[k]

wich raises a key error on the line "for k in request.session:"

Attachments (0)

Change History (1)

comment:1 Changed 7 years ago by pytechd

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed
for k in request.session.keys():
    del request.session[k]

Add Comment

Modify Ticket

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

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

Note: See TracTickets for help on using tickets.