My code looks like this:
#CONTROLLER
def bevestig():
db.bestelling.bedrag.update = '10'
bestelling =
crud.update(db.bestelling,request.args(0),deletable=False,onaccept=
muntgeld_bijboeken)
return dict(bestelling=bestelling)
#VIEW
{{=bestelling}}
The value shown by the controller for 'bedrag' is the value as stated
in the DB for this record;
i would expect the value to be '10'
I also tried moving the update part below the crud.update line, but
same result :)
On Aug 28, 4:44 pm, Massimo Di Pierro <[email protected]>
wrote:
> I do not understand. Can you make a concrete example?
>
> On Aug 28, 9:37 am, JaapP <[email protected]> wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > i am trying to use a crud.update function and want to change the value
> > of a field before passing to the view.
> > i've spent a couple of hours trying and searchin.
>
> > I found this posthttp://permalink.gmane.org/gmane.comp.python.web2py/37314
> > but the suggested use of 'db.table.field.update=' doesn't change the
> > field value as seen in the controller.
>
> > Anybody an idea how this should be implemented?
>
> > thanks!
>
> > Jaap