Pegase745 / sqlalchemy-datatables

SQLAlchemy integration of jQuery DataTables >= 1.10.x (Pyramid and Flask examples)
MIT License
159 stars 67 forks source link

is it possible to return cell data based on other data in the row? #38

Closed louking closed 8 years ago

louking commented 8 years ago

I have a join among several tables. I want to return a calculated value which is based on different tables, but the following raises exception

ColumnDT('race.date',filter=lambda c: timeu.age(c,runner.dob)),

In this case I want to calculate a runner's age on race date, but runner is not defined, getting

NameError: free variable 'runner' referenced before assignment in enclosing scope

Is there some technique I can use to achieve my goal?