Fix queries to use to_django