Best unofficial Apache Server developers community
Username
Forgot password?
Sign in with Twitter account
Sign in with Facebook account

Django-piston: request.data availability within DELETE handlers

0

74 views

django-piston appears to create a data attribute on the request object before it gets to the Handler phase. This data is available, for example, in the PUT and POST handlers by accessing request.data.

However, in the DELETE handler, the data is not available.

I would like to modify django-piston to make this data available but I have no real idea on where to start. Any ideas? Where does the data attribute originate from?

asked February 10, 2011 2:42 pm CST
posted via StackOverflow

1 Answers

0
 

I solved this for myself. The short *****1y answer is that the method

translate_mime(request)

from piston.utils needs to be run on the request to make the data attribute available.

The overall fix for this would be to make a change in the Piston source code itself in resource.py to execute the translate_mime method for DELETE actions. Currently it only does to automatically for PUT and POST.

But, like I said, you can actually just manually call translate_mime in the actual handler method and it works fine.

answered February 11, 2011 1:00 am CST

Your answer

Join with account you already have


Sign in with Twitter account
Sign in with Facebook account
Sign in with Google Friend Connect

Preview
Similar questions
Delete ID From DB
December 25, 2010
How do I delete mysql?
January 14, 2011
OrmLite delete failed
January 21, 2011