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 <freakboy3...@gmail.com>
> wrote:
>> On Mon, Jan 18, 2010 at 5:23 PM, Masklinn <maskl...@masklinn.net> wrote:
>> > On 18 Jan 2010, at 03:04 , Russell Keith-Magee wrote:
>>
>> >> On Mon, Jan 18, 2010 at 8:14 AM, Malcolm Box <malcolm....@gmail.com> 
>> >> wrote:
>> >>> On Sat, Jan 16, 2010 at 4:58 AM, Russell Keith-Magee
>> >>> <freakboy3...@gmail.com> wrote:
>>
>> >>>> On Sat, Jan 16, 2010 at 6:32 AM, Malcolm Box <malcolm....@gmail.com>
>> >>>> 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 django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to