House.objects.extra(where=["id In (%s) order by find_in_set(id,'%s')" % (r.idlist, r.idlist.replace(' ', ''))])