I'm afraid I don't understand what you mean, but I didn't make one for the owner_rep and there it works?
On Saturday, December 14, 2013 8:20:29 PM UTC+2, Massimo Di Pierro wrote: > > Perhaps you did not set a db.t_stores.f_store_name.represent = lambda .... > > On Saturday, 14 December 2013 12:02:08 UTC-6, Avi A wrote: >> >> Hi, >> I want to display item and use the represent() method to display >> reference fields. >> def home(): >> all_items = db(db.t_items).select() >> owner_rep = db.t_stores.created_by >> store_rep = db.t_stores.f_store_name >> category_rep = db.t_categories.f_category_name >> return dict(all_items = all_items, owner_rep = owner_rep, store_rep = >> store_rep, category_rep = category_rep) >> >> #On the view page : >> {{for item in all_items:}} >> {{=owner_rep.represent(item.created_by)}} >> {{=category_rep.represent(item.f_item_category)}} >> {{=store_rep.represent(item.f_item_store)}} >> {{pass}} >> >> >> While it works for the {{=owner_rep....... line, for any of the other >> line I try to do the same (those under it) I get the error: >> >> TypeError: 'NoneType' object is not callable. >> >> Thanks. >> >> >> >> -- 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.