Opened 8 years ago

Closed 8 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:

Description

hi,

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:"

Change History (1)

comment:1 Changed 8 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]
Note: See TracTickets for help on using tickets.
Back to Top