class ChartData(object):

    def check_valve_data():
        data = {'serial numbers': [], 'mass': [], 'pressure drop': [],
            'cracking pressure': [], 'reseat pressure': []}
valves = CheckValve.objects.all()
for unit in valves:
    data['serial numbers'].append(unit.serial_number)
data['mass'].append(unit.mass)
data['cracking pressure'].append(unit.cracking_pressure)
data['pressure drop'].append(unit.pressure_drop)
data['reseat pressure'].append(unit.reseat_pressure)
return data
Passing Django Database Queryset to Highcharts via JSON