do you have an example that works with put() ?
thanks.
###
# my code
# beg
...
# controller
class ContactManagerController(CrudRestController):
model = Contact
table = contact_table
table_filler = contact_table_filler
new_form = contact_add_form
edit_form = contact_edit_form
edit_filler = contact_edit_filler
@expose()
def post(self, **kw):
# do something ...
return super(ContactManagerController, self).post(**kw)
# end
###
On Sun, Dec 27, 2009 at 2:09 PM, khaezzar <kha...@ooeb.com> wrote:
> Creating a put() method just make the "edit form" redirect me to a bad
> request.
> do you have an example that works with put() ?
Yes, It worked for me. Here I leave you an example:
class MyCrudRestController(CrudRestController):
def __init__(self, * args, ** kw):
CrudRestController.__init__(self, * args, ** kw)
@expose('my_edit_template')
def edit(self, * args, ** kw):
return CrudRestController.edit(self, *args, ** kw)
@expose()
@registered_validate(error_handler=edit)
def put(self, * args, ** kw):
# put stuff
return CrudRestController.put(self, * args, ** kw)
Cheers!
--
Mauro Ciancio <maurociancio at gmail dot com>
and again: thanks !
On Dec 27, 6:14 pm, Mauro Ciancio <maurocian...@gmail.com> wrote: