Thank you Alvaro.

Is there a document that details the properties and methods of the
CRUD classes or is it necessary to read the source?

Is there and equally easy fix for replacing the SQLForm used in the
update/add controller function?

Thanks again for the quick response.



On Apr 23, 6:03 pm, Álvaro Justen [Turicas] <alvarojus...@gmail.com>
wrote:
> On Thu, Apr 23, 2009 at 6:55 PM, Gary <gary.k.ma...@gmail.com> wrote:
>
> > This seems so elementary, but it's been bugging me for days.  I tried
> > to find more information in the documentation, in the book, searched
> > this group and even read the source (as best I could),  but I'm
> > stymied.
>
> > When I use the function:
>
> >http://localhost:8001/myapp/default/data/update/person/1
>
> > the form is displayed as expected, but after the update, the resulting
> > screen is (redirected to):
>
> >http://localhost:8001/myapp/default/data/tables
>
> > and I cannot figure out how to change that behavior, for example call
> > index.
>
> > Am I missing something fundamentally simple?  Also, what is the best
> > way to modify the SQLForm that is used in the display.  Is there a
> > better description on how to use the CRUD functions?
>
> By default, web2py have in gluon/tools.py, class Crud:
>         self.settings.create_next = URL(r=request)
>         self.settings.update_next = URL(r=request)
>         self.settings.delete_next = URL(r=request)
>
> So, if you have:
> mycrud = Crud(globals(), db)
> you can change URLs with:
>
> mycrud.settings.create_next = URL(r=request, f='myfunction', args='...')
> Same for update_next and delete_next.
>
> --
>  Álvaro Justen
>  Peta5 - Telecomunicações e Software Livre
>  21 3021-6001 / 9898-0141
>  http://www.peta5.com.br/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to