Ben Bangert wrote:
And a map.resource('talk','talks') with a talks.py controller and a
delete(self,id) method, I get an error and the method on the debug
page says "POST". Any thoughts?
I'm guessing this is because a POST to a individual resource is
meaningless in RESTful applications. You can PUT to a specific resource
to update it, DELETE the resource, or GET the resource. Under a typical
RESTful setup, you POST to the resource collection to add new members.
(Atom Publishing Protocol serves as the best model for a RESTful app I
believe, which is what this setup duplicates).
POST isn't meaningless; PUT can only be used for direct updates on an
object, everything else is done as a POST. PUT can also be used to
create objects; APP doesn't use that, because it lets the store control
the URL space, but in contrast WebDAV does use PUT to create resources.
POST might be used for simple kinds of updates -- e.g., increment a
counter -- or other kinds of control situations. It's not particularly
unRESTful IMHO.
--
Ian Bicking | [EMAIL PROTECTED] | http://blog.ianbicking.org
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---