You need to use response.flash

def show_id(id):
   message = crud.messages.record_created = 'Record nr %d created' %id
   response.flash= message
   return message

2010/9/21 Bruno Rocha <[email protected]>

> form.vars.id contains the id or a newly inserted record.
>
> 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
>



-- 

http://rochacbruno.com.br

Reply via email to