I find it easiest and cleanest to reformat data structures in python,
using list comprehensions. Javascript sucks for loops. So instead of
jsonifying the raw database output, fix it first:
export_optimizer_records = [{'FreezeTime': r.panel_1hrs.FreezeTime,
'StringID': r.panel_1hrs.StringID,
Mind that this is old syntax:
r._extra['sum(panel_1hrs.Po_avg)']
it is equivalent and better to use:
r[db.panel_1hrs.Po_avg.sum()]
On Jan 15, 2:29 pm, Michael Toomim too...@gmail.com wrote:
I find it easiest and cleanest to reformat data structures in python,
using list comprehensions.
2 matches
Mail list logo