Opened 11 years ago
Closed 10 years ago
#22799 closed Cleanup/optimization (fixed)
GET and POST on HttpRequest should be QueryDicts
Reported by: | Owned by: | duncan | |
---|---|---|---|
Component: | HTTP handling | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | yes |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
On a new HttpRequest object, GET and POST are are empty dictionaries when they really ought to be QueryDicts. This is not something you would usually notice causing trouble in production as you get a WSGIRequest instead of an HttpRequest, but in testing using the test client, calling .getlist on GET or POST for a request with no get/post data results in an AttributeError.
I've made a pull request to change this: https://github.com/django/django/pull/2778
Change History (5)
comment:1 by , 11 years ago
Type: | Uncategorized → Bug |
---|
comment:2 by , 11 years ago
Needs documentation: | set |
---|---|
Patch needs improvement: | set |
Triage Stage: | Unreviewed → Accepted |
Type: | Bug → Cleanup/optimization |
comment:3 by , 11 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:4 by , 11 years ago
I've updated the pull request in line with bmispelon's suggestions, let me know if there is anything else you need.
Cheers,
Duncan
comment:5 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Hi,
This seems like a reasonable feature to add.
I've left a comment on the pull request and on top of that, you should also add a mention in the release notes for 1.8.
Thanks.