Opened 16 years ago
Closed 12 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)
Change History (11)
Changed 15 years ago by
Attachment: | 6580.patch added |
---|
comment:1 Changed 15 years ago by
Has patch: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 Changed 14 years ago by
Patch needs improvement: | set |
---|
Patch looks good. The getlist
docstring should be updated too though.
Changed 13 years ago by
Attachment: | fix6580.patch added |
---|
comment:3 Changed 13 years ago by
Patch needs improvement: | unset |
---|
Docstring updated, patch ported to trunk.
comment:4 Changed 13 years ago by
Type: | → New feature |
---|
comment:5 Changed 12 years ago by
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 12 years ago by
Attachment: | 6580-unittests.diff added |
---|
comment:6 Changed 12 years ago by
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 12 years ago by
Patch needs improvement: | unset |
---|---|
Triage Stage: | Accepted → Ready for checkin |
Looks good to me.
Includes documentation & tests.