it was simple:
locations = Location.objects.filter(category=category.id,
status=2).extra(
select={'image': 'SELECT locations_images.image FROM
locations_images WHERE locations_images.location_id =
locations_location.id ORDER BY locations_images.order ASC LIMIT 1'
},
).only('nam
Hi to all django users,
i just completed a project in which I used the extra() database API
function in order to save the number of query used. Unfortunately the
production server doesn't use Postgres but MySQL.
I don't know why but I'm not making it to convert the query so it's
compatible with M
2 matches
Mail list logo