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