-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Thibault,
Thanks for checking in on this ticket. It's helpful to get a clear resolution rather than leaving things hanging in an unclear state. On 12/01/2011 11:14 AM, Thibault Jouannic wrote: > I'm looking for some news about the ticket #12635. > > https://code.djangoproject.com/ticket/12635 > > Today, it's still impossible to easily access post data when sending a > PUT request. Since I'm trying to build a restful web service using > django, this is quite a problem. > > It's been told in another thread to use the `request.raw_post_data` > attribute, however I cannot think of a valid reason for why put data > could'nt be has easily accessible as post data. The valid reason is outlined by Malcolm Tredinnick in a thread linked from that ticket [1], and by Ian Clelland just now. request.POST is a special-case for a request body submitted with the "x-www-form-urlencoded" or "multipart/form-data" content types. This is common for POST because these content types are used by web browsers to submit HTML forms. However, web browsers do not submit PUT requests from HTML forms (and they aren't likely to ever do so, as that proposed HTML5 feature was removed [2]). Therefore, there's no reason to think form-urlencoded is any more common than any other content type for PUT requests (in fact, in my experience it's rare to find a web service that expects form-urlencoded; JSON and XML are much more common). So there is no reason to privilege form-urlencoded by adding a special case for it. If you do want your web service to accept form-urlencoded or multipart/form-data PUT requests, you can still use Django's QueryDict and/or MultiPartParser to do the heavy lifting for you. > I see in the ticket that the 1.4 milestone was deleted. Was the ticket > abandoned? > > I've seen a lot of discussions and tickets about rest, and I know it's > a complex issue, but since I'm kinda new here, it's hard to know what > is the current state of the problem. The ticket was in "Design Decision Needed" state, which isn't very clear - - it means the core developers haven't yet made a decision on whether it needs to be addressed or not. I've now closed the ticket wontfix, based on the above reasoning. Hopefully that helps clarify its status. Carl [1] http://groups.google.com/group/django-developers/browse_thread/thread/771238a95ceb058e/ [2] http://www.w3.org/TR/2010/WD-html5-diff-20101019/#changes-2010-06-24 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk7X5l0ACgkQ8W4rlRKtE2cAQACgmo9k/hCLtCK+fgvChJzqRSV7 9WQAoLox8Ok0EuqUSprxl0uG2e78zVpN =gvqm -----END PGP SIGNATURE----- -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.
