Is there a way I can serialize a FloatField model instance in django? I have the following in a management command:
def chart_data(request):
i = 1
chart = open_flash_chart()
chart.title = t
for manager in FusionManagers.objects.all():
net_data = manager.netio_set.values_list('Net', flat=True)
clean = serializers.serialize('json', [ net_data, ])
new = line()
new.values = clean
locals()["graph_" + str(i)] = new
chart.add_element(locals()["graph_" + str(i)])
i = i + 1
return HttpResponse(chart.render())
But I get the error: 'ValuesListQuerySet' object has no attribute '_meta' The 'Net' fields are floatfields, and the values are filtered to 2 decimal places, so I get 400.23, etc... Can these be serialized?