Opened 9 years ago

Closed 5 years ago

#6580 closed New feature (fixed)

Default argument to `getlist` on QueryDict

Reported by: David Cramer Owned by: nobody
Component: HTTP handling Version: master
Severity: Normal Keywords:
Cc: andrewebdev Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX:

Description

Add an optional default argument to the getlist method on QueryDict's.

This would work just like it does on get, getattr, etc.

Attachments (3)

6580.patch (3.5 KB) - added by Matthias Kestenholz 8 years ago.
fix6580.patch (1.9 KB) - added by Matthias Kestenholz 6 years ago.
6580-unittests.diff (2.8 KB) - added by andrewebdev 5 years ago.

Download all attachments as: .zip

Change History (11)

Changed 8 years ago by Matthias Kestenholz

Attachment: 6580.patch added

comment:1 Changed 8 years ago by Matthias Kestenholz

Has patch: set
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted

Includes documentation & tests.

comment:2 Changed 7 years ago by Chris Beaven

Patch needs improvement: set

Patch looks good. The getlist docstring should be updated too though.

Changed 6 years ago by Matthias Kestenholz

Attachment: fix6580.patch added

comment:3 Changed 6 years ago by Matthias Kestenholz

Patch needs improvement: unset

Docstring updated, patch ported to trunk.

comment:4 Changed 6 years ago by Julien Phalip

Type: New feature

comment:5 Changed 5 years ago by Julien Phalip

Easy pickings: set
Patch needs improvement: set
Severity: Normal

This looks great but it'd be even better if all the doctests in MultiValueDict were rewritten using unittests as it's now Django's preferred way.

Changed 5 years ago by andrewebdev

Attachment: 6580-unittests.diff added

comment:6 Changed 5 years ago by andrewebdev

Cc: andrewebdev added

Moved doctests to unittests. Also checked that all older test that I removed from the docstring is also tested in the unittest.

comment:7 Changed 5 years ago by Dougal Matthews

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

Looks good to me.

comment:8 Changed 5 years ago by Jannis Leidel

Resolution: fixed
Status: newclosed

In [16260]:

Fixed #6580 -- Added default parameter to MultiValueDict.getlist method (the base class for QueryDict). Many thanks to mk and andrewebdev.

Note: See TracTickets for help on using tickets.
Back to Top