thanks,
it works but now i have another step to do ...
the CRUD don't save on db the operations.. for example it don't delete
any item ... and why i have 2 id field in my form????
this is my function:
def myfunction():
"""
return a custom object to be inserted in detail for table
"""
key = None
for k in request.vars.keys():
if k[:3] == 'dt_':
key = request.vars[k]
item_id = None
item_id = key.split('.')[-1]
obj = DIV()
obj.append(H1(T('Title for my details')))
obj.append(crud.update(db.auth_user,item_id))
db.auth_user.update()
return dict(obj=obj)
On 4 Feb, 11:02, Johann Spies <[email protected]> wrote:
> On 4 February 2011 11:50, ceriox <[email protected]> wrote:
>
> > another questions...
> > how can manage parameters in function call ?
>
> > details={'detailscallback':URL('myfunction.load')}
> > )
>
> > i want to have my row id in myfunction
>
> You can specify the sql-query in myfunction. I have the following:
>
> key = None
> for k in request.vars.keys():
> if k[:3] == 'dt_':
> key = request.vars[k]
>
> art_id = None
> art_id = key.split('.')[-1]
>
> obj = DIV()
> obj.append(SQLTABLE(db((db.outeur_art_ekw.artikel == art_id)&
> (db.outeur.id ==
> db.outeur_art_ekw.skrywer)).select(db.outeur.ALL,orderby= db.outeur.van)))
>
> where the function shows entries in db.outeur related to db.artikel.id.
>
> Regards
> Johann
> --
> May grace and peace be yours in abundance through the full knowledge of God
> and of Jesus our Lord! His divine power has given us everything we need for
> life and godliness through the full knowledge of the one who called us by
> his own glory and excellence.
> 2 Pet. 1:2b,3a