Django

Code

Ticket #4270 (closed: fixed)

Opened 2 years ago

Last modified 2 years ago

immutable QueryDict allows deletion of keys

Reported by: Gary Wilson <gary.wilson@gmail.com> Assigned to: adrian
Milestone: Component: Core framework
Version: SVN Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

>>> from django.http import QueryDict
>>> q=QueryDict('vote')
>>> q
<MultiValueDict: {'vote': ['']}>
>>> del q['vote']
>>> q
<MultiValueDict: {}>

Attachments

4270.diff (1.1 kB) - added by Gary Wilson <gary.wilson@gmail.com> on 05/10/07 12:47:27.
Added __delitem__ to QueryDict that checks if mutable. Tests too.

Change History

05/10/07 12:47:27 changed by Gary Wilson <gary.wilson@gmail.com>

  • attachment 4270.diff added.

Added __delitem__ to QueryDict that checks if mutable. Tests too.

05/10/07 12:48:24 changed by Gary Wilson <gary.wilson@gmail.com>

  • needs_better_patch changed.
  • has_patch set to 1.
  • stage changed from Unreviewed to Ready for checkin.
  • needs_tests changed.
  • needs_docs changed.

05/11/07 03:19:26 changed by mtredinnick

Nice catch, Gary. These little tidying-up patches you've been posting are very useful. Thanks.

05/11/07 03:22:07 changed by mtredinnick

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

(In [5187]) Fixed #4270 -- Don't permit deleting of items from an immutable QueryDict?. Thanks, Gary Wilson.


Add/Change #4270 (immutable QueryDict allows deletion of keys)




Change Properties
Action