so, you have an url (i.e. a string) that needs to return an image. you should have a controller that, when that URI is matched, returns the image after increasing its number_visited value.... seems pretty standard to me....
On Wednesday, March 27, 2013 7:15:12 PM UTC+1, Lamps902 wrote: > > Let's say you have an SQL grid generated from a db with field *my_url*, > which stores the value of an absolute URL, and has a representation defined > in this way: > > db.my_db.my_url.represent = lambda the_url, row: A(generate_link_image(), > _href=the_url, _target='_blank') > > What would be a good way to modify the above code so that when the link is > clicked, some field in *my_db* (for example, *number_visited*, > corresponding to the number of times the url has been clicked) is updated? > I'm not sure you can use _href=URL(...) with absolute links, and other > variants I've tried end up updating every record referenced in the table > rather than just the one that the user clicks. Thanks. > -- --- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

