I have the following loop:
for elem in Data.objects.filter(user=id):
variables['labels'].append(time.strftime("%H%M%S", time.localtime(elem.timestamp)))
This produces the following result:
['000000', '000000', '000000', '000000', '000000', '000000', '000000', '000000', '000000', '000000', '000000', '000000', '000000', '000000', '000000', '000000', '000000', '000000']
But when I inspect the html this is the result:
labels: ['000000', '000000', '000000', '000000', '000000', '000000', '000000', '000000', '000000', '000000', '000000', '000000', '000000', '000000', '000000', '000000', '000000', '000000']
Why this happens?