Jesse, I think that this is a decent idea. One thing that I think would be useful though is for this sort of transform to be transparent... that way templates can be constructed properly <form method="PUT"...> and the middleware can handle the transformation.
I've put together a quick example combining your code and that of the CSRF middleware. [0] Note the name-change of the middleware as well, since this has applications beyond REST. Like the CSRF middleware, XMLHttpRequests using these methods still need manual attention. I can put this on djangosnippets, but since you're the original author I figured I'd give you the opportunity first. - Ben [0] http://dpaste.com/hold/8377/ On 4/12/07, Jesse Lovelace <[EMAIL PROTECTED]> wrote: > > Hi all, > > I've been interested in the idea of faking HTTP methods that > browsers/servers might not support like the rails people are doing in > 1.2 so I've written a very minimal middleware to do this--if someone > else has done this already sorry for the repetition. (It does the > method faking using a post form with a <input type="hidden" > name="_method" value="PUT"/>) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---