I always setup two view functions, one for GET and one for POST.

I don't do PUT, but if you want Pyramid lets you condition a view on both 
the request method and parameters. The second function should only be called 
for a PUT, or a POST with _method=PUT in the parameters:

def some_method(request):
   # handle everything else

def some_method_PUT(request):
    # handle the PUT

...

config.add_view(some_method)
config.add_view(some_method_PUT, request_method='PUT')
config.add_view(some_method_PUT, request_method='POST', 
request_param="_method=PUT")

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-devel" group.
To post to this group, send email to pylons-devel@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-devel?hl=en.

Reply via email to