I have a smartgrid example with delete button removed and a links=links 
dictionary for delete:  

    links=[lambda row: 
A(T('Delete'),_href=URL("configure","delete",args=["delete", db.person, 
row.id]))]

For children in the smartgrid, the delete URL request args remains the 
parent table name (db.person in this example).
Is there a way to form links= such that the children will have their table 
name attached to the URL
(so I delete the child and not the parent)? 

I found a horrible way to do this by placing the tablename inside the db.py 
definition to pass to the delete URL

    links=[lambda row: 
A(T('Delete'),_href=URL("configure","delete",args=["delete", row.tablename, 
row.id]))]

but this was just an exercise and prone to way to many problems...

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to