Opened 7 years ago

Closed 4 years ago

#6580 closed New feature (fixed)

Default argument to `getlist` on QueryDict

Reported by: dcramer 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 mk 7 years ago.
fix6580.patch (1.9 KB) - added by mk 4 years ago.
6580-unittests.diff (2.8 KB) - added by andrewebdev 4 years ago.

Download all attachments as: .zip

Change History (11)

Changed 7 years ago by mk

comment:1 Changed 7 years ago by mk

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

Includes documentation & tests.

comment:2 Changed 6 years ago by SmileyChris

  • Patch needs improvement set

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

Changed 4 years ago by mk

comment:3 Changed 4 years ago by mk

  • Patch needs improvement unset

Docstring updated, patch ported to trunk.

comment:4 Changed 4 years ago by julien

  • Type set to New feature

comment:5 Changed 4 years ago by julien

  • Easy pickings set
  • Patch needs improvement set
  • Severity set to 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 4 years ago by andrewebdev

comment:6 Changed 4 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 4 years ago by d0ugal

  • Patch needs improvement unset
  • Triage Stage changed from Accepted to Ready for checkin

Looks good to me.

comment:8 Changed 4 years ago by jezdez

  • Resolution set to fixed
  • Status changed from new to closed

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