no effect...neither session.flash='aaaa' or message = 'aaaa'
On 14 Nov, 12:52, Iceberg <[email protected]> wrote:
> Use session.flash instead.
>
> On Nov14, 7:06pm, leone <[email protected]> wrote:
>
>
>
> > Ooops...
> > It runs but .update_next interferes with message in response.flash and
> > redirect *before* the drop_down message.
> > There is a way to redirect *after* notification of response.flash?
> > Thanks in advance.
>
> > On 14 Nov, 11:56, "mr.freeze" <[email protected]> wrote:
>
> > > You need to set your crud settings before calling the crud functions:
>
> > > def add():
> > > crud.settings.keepvalues = True
> > > crud.messages.submit_button = 'Add'
> > > form = crud.create(db.things,
> > > message='Row added')
> > > return dict(form=form)
>
> > > def update():
> > > crud.messages.submit_button = 'Update/Delete'
> > > crud.settings.update_next = URL(r=request, c='default', f='index')
> > > form = crud.update(db.address,
> > > request.args[0],
> > > message='Row updated')
> > > return dict(form=form)
>
> > > On Nov 14, 3:40 am, leone <[email protected]> wrote:
>
> > > > I have no success to customize submit button in crud_create and
> > > > crud_update.
> > > > I can't redirect crud_update too. Where is my error?
>
> > > > My code:
> > > > def add():
> > > > form = crud.create(db.address,
> > > > message='Row added')
> > > > crud.settings.keepvalues = True
> > > > crud.messages.submit_button = 'Add'
> > > > return dict(form=form)
>
> > > > def update():
> > > > form = crud.update(db.address,
> > > > request.args[0],
> > > > message='Row updated')
> > > > crud.messages.submit_button = 'Update/Delete'
> > > > crud.settings.update_next = URL(r=request, c='default', f='index')
> > > > return dict(form=form)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---