Reputation: 110382
How would I do the following in the django ORM:
select * from catalog order by field(id, list_of_ids)
So far I have:
ids = [1,5,3]
Catalog.objects.extra(order_by=[...?])
What would be the correct way to do this?
Upvotes: 1
Views: 174