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.
+1 to deprecating this. In the rare cases where it is useful (mainly 'next' for redirects) it is very easy to work around it not being there - request.GET.get('next', request.POST.get('next')) - so I see no reason for it to always exist.
In most cases I feel its use is not a good idea™…
Marc
--
You received this message because you are subscribed to the Google Groups "Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/d5946498-942d-4f47-8446-4eebfdf64f7c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAMwjO1GQUrWxjZ8Z_vfNHPbxXMxWBFyvbQgDkUn9dqatKvcR4A%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/201310161814.07961.shai%40platonix.com.
For more options, visit https://groups.google.com/groups/opt_out.
yes, they're different, but is there any value in emphasizing the difference?
While pour point is technically valid as far as request.GET and request.POST are concerned, in practice they're so commonly used as a metonymy for HTTP GET and HTTP POST that it's worth having a strong stance on keeping them separate.
Seems to me an intermediary step is to add request.DATA (then maybe request.QUERY eventually) as a long term movement towards being better http. It isn't something we should do overnight.
I noticed this patch is now in 1.7 and 1.9 will remove request.REQUEST.
Marc
--
You received this message because you are subscribed to the Google Groups "Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/a7af947a-8d78-4855-abaa-4625d896e0b6%40googlegroups.com.