On Sunday, January 3, 2016 at 9:36:56 AM UTC-5, RAGHIB R wrote: > > {{for x in uu:}} > <a href= {{db.store.insert(stuff=x.id)}}> >
I think it does work as expected if you have read the documentation. The above code will insert a record into the db.store table with the value of the "stuff" field set to x.id. It appears what you want is for that insert to happen when the user clicks that link. In that case, note that the href must be a URL that points to a web2py action that will do the insert. You cannot simply put some arbitrary Python code in place of the href of a link and expect the code to be executed when the link is clicked. I don't think anything in the documentation suggests that that would work. Also, note that if you want to insert some content in a template, you must use the "=" sign -- that is, {{=something}} rather than {{something}}. Anthony -- 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/d/optout.