Remove `request.REQUEST`
request.REQUEST provides indifferent access to request.GET or request.POST (PHP style).
This attribute is a legacy from the pre-1.0 days, when you could access the GET or POST data using dict syntax on the request object. request.REQUEST was introduced in 1.0 to make this operation more explicit, with an easy upgrade path.
It's hardly ever a good design pattern to handle GET and POST identically, and it's our responsibility not to provide tools who are more likely to result in bad code than anything else. So I think it's time to deprecate this attribute.
We could deprecate django.utils.datastructures.MergeDict at the same time — it's a 100-lines long class whose sole purpose is to support request.REQUEST.
Change History
(11)
| Triage Stage: |
Unreviewed → Accepted
|
| Cc: |
eduardocereto@… added
|
| Component: |
Core (Other) → HTTP handling
|
| Owner: |
changed from nobody to Bouke Haarsma
|
| Status: |
new → assigned
|
| Has patch: |
set
|
| Patch needs improvement: |
set
|
| Version: |
1.4 → master
|
| Resolution: |
→ fixed
|
| Status: |
assigned → closed
|
This may break a lot of code, so this isn't a decision to make lightly.
Django itself uses
request.REQUESTin i18n views, auth, and admin.