I think you cannot asign a value to crud.messages.record_created after crud
is created.

You need to define crud settings before the creating of crud form.

2010/9/21 Johann Spies <[email protected]>

> I was hoping that the following would modify the "Record created" flash
> message:
>
> def show_id(id):
>    message = crud.messages.record_created = 'Record nr %d created' %id
>    return message
>
> def fetm04_create():
>    table=db.fetm04
>    #crud.settings.auth = auth          # enforces authorization on crud
>    crud.settings.keepvalues = True
>    form=crud.create(db.fetm04,onaccept=lambda form:
>                     show_id (form.vars.id))
>    auth.settings.register_onaccept = (lambda
> form,table=table:give_create_permission(form,table))
>    return dict(form=form)
>
> But it does not happen.  What am I missing?
>
> Johann
>
> --
>     "The fool hath said in his heart, There is no God..."
>                                Psalm 14:1
>



-- 

http://rochacbruno.com.br

Reply via email to