This is a somewhat old topic, but a workaround for those (such as
myself) who need to process parameters from the request body on
non-POST methods (such as PUT) is to write:

body_params = QueryDict(request.raw_post_data, encoding=request.encoding)

and use this dictionary (body_params) in the same way that you would
use request.POST.

A similar workaround may be produced for files, but this should be
enough for most RESTful API implementations (until we get the official
support as discussed before).

Cheers
  Chester

> On Jan 18, 12:31 pm, Russell Keith-Magee <[email protected]>
> wrote:
>> On Mon, Jan 18, 2010 at 5:23 PM, Masklinn <[email protected]> wrote:
>> > On 18 Jan 2010, at 03:04 , Russell Keith-Magee wrote:
>>
>> >> On Mon, Jan 18, 2010 at 8:14 AM, Malcolm Box <[email protected]> 
>> >> wrote:
>> >>> On Sat, Jan 16, 2010 at 4:58 AM, Russell Keith-Magee
>> >>> <[email protected]> wrote:
>>
>> >>>> On Sat, Jan 16, 2010 at 6:32 AM, Malcolm Box <[email protected]>
>> >>>> wrote:
>> >>>> <snip>
>> >>>>> It seems to me that Django should process POST and PUT requests the 
>> >>>>> same
>> >>>>> -
>> >>>>> i.e. the request.FILES attribute should be initialised for either if a
>> >>>>> multipart content-type is detected.
>>
>> >>>>> Have I fundamentally misunderstood how this stuff should work?
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" 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-users?hl=en.

Reply via email to