On Monday, June 10, 2013 12:18:51 PM UTC-4, Alex Glaros wrote: > The 2nd example, function, gets an error: > > > - In the controller the function error is: <type > 'exceptions.NameError'> name 'rtid_represent' is not defined > - If I put the function in the model, error is: <type > 'exceptions.SyntaxError'> 'return' outside function (db.py, line 1013) > > I assume you've got some copy/paste errors. As you can see, the rtid_represent function is defined right before it is assigned as the value of the represent attribute, so it cannot be "not defined" at that point. Likewise, the "return" statement is clearly inside the function. Check for rogue spaces/tabs, etc., and make sure the code is properly in order.
Anthony -- --- 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.

