I am getting order_by fields in the form of a list. I want to order_by by multiple fields with django orm. List is like below:
orderbyList = [\'check-in\',\'
Try this:
listOfInstance = modelclassinstance.objects.all() for askedOrder in orderbyList: listOfInstance = listOfInstance.order_by(askedOrder)