Opened 16 years ago

Closed 13 years ago

#6580 closed New feature (fixed)

Default argument to `getlist` on QueryDict

Reported by: David Cramer Owned by: nobody
Component: HTTP handling Version: dev
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: no

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 16 years ago.
fix6580.patch (1.9 KB ) - added by Matthias Kestenholz 13 years ago.
6580-unittests.diff (2.8 KB ) - added by andrewebdev 13 years ago.

Download all attachments as: .zip

Change History (11)

by Matthias Kestenholz, 16 years ago

Attachment: 6580.patch added

comment:1 by Matthias Kestenholz, 16 years ago

Has patch: set
Triage Stage: UnreviewedAccepted

Includes documentation & tests.

comment:2 by Chris Beaven, 15 years ago

Patch needs improvement: set

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

by Matthias Kestenholz, 13 years ago

Attachment: fix6580.patch added

comment:3 by Matthias Kestenholz, 13 years ago

Patch needs improvement: unset

Docstring updated, patch ported to trunk.

comment:4 by Julien Phalip, 13 years ago

Type: New feature

comment:5 by Julien Phalip, 13 years ago

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.

by andrewebdev, 13 years ago

Attachment: 6580-unittests.diff added

comment:6 by andrewebdev, 13 years ago

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 by Dougal Matthews, 13 years ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

Looks good to me.

comment:8 by Jannis Leidel, 13 years ago

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