Yes, I did. But I shouldn't have included arguments in the 'view' function. That was the error.
So how do I extract the arguments 'products' and '11' (in my example) in the view function? response._vars apparently does not contain them. Thanks. On Tuesday, 21 January 2014 01:35:52 UTC-5, Johann Spies wrote: > > Did you create a function 'view' in the default controller? > > Regards > Johann > > > On 21 January 2014 06:44, horridohobbyist <horrido...@gmail.com<javascript:> > > wrote: > >> I can't get this to work. I'm new to web2py. Perhaps I don't understand >> the argument-passing mechanism... >> >> In SQLFORM.grid, I have: >> >> links=[lambda row: A('View',_href=URL('view',args=[db.products,row.id >> ]))], >> >> In the default controller, I have: >> >> def view(table,id): >> return dict() >> >> I get the following error: >> >> invalid function (default/view) >> >> ...with this: >> >> https://my_ip_addr/HorridoHobbies/default/view/products/11 >> >> Shouldn't the arguments 'products' and '11' be passed to the view >> function? What am I not understanding? >> >> Thanks. >> >> On Thursday, 6 October 2011 08:36:26 UTC-4, simon wrote: >>> >>> You can add your own buttons using: >>> >>> links = [lambda row: A('Edit',_href=URL("controller","edit", >>> args=["update", tablename, a.id])) >>> >>> and set editable, deletable, details to False. >>> >>> >>> On Oct 6, 12:48 pm, Johann Spies <johann.sp...@gmail.com> wrote: >>> > How do I override the views/controllers triggered by the buttons >>> mentioned >>> > in the subject line when using SQLFORM.grid/smartgrid? >>> > >>> > 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 >> >> -- >> 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+un...@googlegroups.com <javascript:>. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > > > -- > Because experiencing your loyal love is better than life itself, > my lips will praise you. (Psalm 63:3) > -- 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.