Re: [web2py] computed fields question
yes I think it is a bug. the update form method checks for writable fields. should be documented or fixed. can you open the ticket? http://zerp.ly/rochacbruno Em 24/07/2012 10:26, "Vasile Ermicioi" escreveu: > may be the writable False can be the issue > > > yes, that is, > thanks a lot Bruno > > but isn't it a weird behavior? > > -- > > > > --
Re: [web2py] computed fields question
> > may be the writable False can be the issue yes, that is, thanks a lot Bruno but isn't it a weird behavior? --
Re: [web2py] computed fields question
you dont need to set writable=False. I think it is default for conputed fields. I've seem this happening before, but I cant remember the reason. (may be the writable False can be the issue) http://zerp.ly/rochacbruno Em 24/07/2012 07:34, "Vasile Ermicioi" escreveu: > hi, > > I have a function and a computed field > > def content_snapshot(s): > #do something with s > return modified_s > > > Field("content_snapshot", "text", readable=False, writable=False, > compute=lambda r: content_snapshot(r['content'])), > > and it works only for insert operations, on updates it is not changed > > any thoughts? > > -- > > > > --
[web2py] computed fields question
hi, I have a function and a computed field def content_snapshot(s): #do something with s return modified_s Field("content_snapshot", "text", readable=False, writable=False, compute=lambda r: content_snapshot(r['content'])), and it works only for insert operations, on updates it is not changed any thoughts? --