I think the issue was by ths following , Not automatically, but with a bit of work, yes. You need to define a comparator function (or cmp method on the model class) that can compare two model instances according to the relevant attribute. For instance:
created = models.DateTimeField(default=datetime.now)
ordering = ('created',)
def __cmp__(self, other):
return cmp(self.created, other.created)
return cmp(self.created, other)
will help you To solve your immediate problem - assuming that's itertools.chain, chain takes multiple iterables. Use chain(*count_items) to expand your list of querysets. But you can save yourself some trouble by using InventoryDetails.objects.filter(inventory_location__in=inv_locations).order_by('epc').distinct() - that'll do the sorting and uniquing in the database rather than you doing it in your view.
django querysets order by hour, minute and seconds