Thanks, I see the request.raw_post_data now in my middleware class,
however, that request never gets to my view, but instead is sent back
as a 301 redirect and then the request_post_data is gone. I'm
guessing one of the other middleware classes is causing that, but I
couldn't figure out which one from looking at the code.
Here are my middleware classes:
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django_openid.consumer.SessionConsumer',
'account.middleware.LocaleMiddleware',
'django.middleware.doc.XViewMiddleware',
'djangologging.middleware.LoggingMiddleware',
'pagination.middleware.PaginationMiddleware',
'misc.middleware.SortOrderMiddleware',
'djangodblog.middleware.DBLogMiddleware',
'django.middleware.transaction.TransactionMiddleware',
)
Do I need some sort of decorator for my view to allow PUT requests?
On Jan 21, 4:17 pm, Malcolm Tredinnick <[email protected]>
wrote:
> On Wed, 2009-01-21 at 07:01 -0800, junker37 wrote:
> > I can't seem to get django to handle a PUT request.
>
> > I've googled quited a bit and there seems to be some RESTful
> > interfaces available for django, however, I can't seem to get any of
> > them to work because the PUT request gets a 301 direct to a GET
> > request.
>
> > I created my own middleware where I can see it getting the PUT
> > request, however, I can not find where in the request I can get at the
> > PUT data.
>
> request.raw_post_data contains the submitted data.
>
> Regards,
> Malcolm
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---