Hi, I have an issue I cannot resolve. As I am not an expert, this is probably a personal bug (a 'stupid error'...). Thank in advance for any help.
Here is how this happens... 1. My db model has 2 tables and 2 rendering functions... def render_company(f_company = None, row = None): myreturn = '' if f_company: mycompany = db.t_txp_company(f_company) myreturn = mycompany.f_company return myreturn def render_employee(f_employee = None, row = None): myreturn = '' if f_employee: myuser = db.auth_user(f_employee) myreturn = myuser.first_name + ' ' + myuser.last_name return myreturn db.define_table('t_txp_company', Field('f_company')) db.define_table('t_txp_employee', Field('f_company', 'reference t_txp_company'), Field('f_employee', 'reference auth_user')) db.t_txp_employee.f_company.represent = render_company db.t_txp_employee.f_employee.represent = render_employee 2. My controller has a single smartgrid function @auth.requires_login() def company(): formcompany = SQLFORM.smartgrid(db.t_txp_company) return dict(formcompany=formcompany) 3. How my error occurs... - From the company smartgrid function, I create a companyn and then I create an employee for this company : this works fine - Coming back to employee level, the rendering functions also work correctly (auth first name and last name are ok). - But at that level, if I want to view or edit the employee by clicking on the 'Edit' button , then you I get the following error ticket... <type 'exceptions.RuntimeError'> field representation must take 1 or 2 args -- 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.