queryset.values() returns a list of dicts, and dicts don't return their items in any particular order.
if you want your values in order, use queryset.values_list which returns a list of tuples.
(you will need to keep the list of columns in a separate context variable)
http://stackoverflow.com/questions/11168488/django-queryset-values-method-fields-order-is-different-with-returned