Assuming it quacks like a duck, you can use operator.attrgetter()
Combine queryset by turning it into a list:
queryset_list = list(queryset1).extend(list(queryset2))
Sort the list by:
sorted_list = queryset_list.sort(key=operator.attrgetter(‘attribute to sort by’))
0 responses so far ↓
There are no comments yet...Kick things off by filling out the form below.