It is ok to do

search, rows = crud.search(table), crud.select(table)

Edited!

2010/11/4 villas <[email protected]>

> http://www.web2py.com/book/default/chapter/07#CRUD
>
> I noticed this example in the book which does not seem correct:
>
> def manage():
>    table=db[request.args(0)]
>    form = crud.update(table,request.args(1))
>    table.id.represent = lambda id: \
>       A('edit:',id,_href=URL(args=(request.args(0),id)))
>    search, rows = crud.select(table)    # <<<------
>    return dict(form=form,search=search,rows=rows)
>
> May I suggest replacing the marked line:
>    search, rows = crud.select(table)
>
> with these two lines:
>    search = crud.search(table)
>    rows = crud.select(table)
>
> -D




-- 

http://rochacbruno.com.br

Reply via email to