Thanks!
On Friday, 5 June 2015 08:53:48 UTC+1, kel...@ist-total.org wrote:
>
> On Fri Jun 5 08:32:52 2015 GMT+0100, Cherie Pun wrote:
> >
> > Thanks! Would this still give 404 errors when a certain object does not
> > exist?
>
> Nope, but if you really need to ensure all ids exist in the datab
On Fri Jun 5 08:32:52 2015 GMT+0100, Cherie Pun wrote:
>
> Thanks! Would this still give 404 errors when a certain object does not
> exist?
Nope, but if you really need to ensure all ids exist in the database, compare
the length of your level_ids with levels.count()
Make sure there are no dupli
Thanks! Would this still give 404 errors when a certain object does not
exist?
On Tuesday, 2 June 2015 17:07:49 UTC+1, Simon Charette wrote:
>
> Hi Cherie,
>
> A `id__in` queryset lookup should issue a single query.
>
> levels = Level.objects.filter(id__in=level_ids)
>
> Cheers,
> Simon
>
> Le m
Hi Cherie,
A `id__in` queryset lookup should issue a single query.
levels = Level.objects.filter(id__in=level_ids)
Cheers,
Simon
Le mardi 2 juin 2015 11:42:19 UTC-4, Cherie Pun a écrit :
>
> Hi,
>
> I am new to Django and I am performing some iteration on a queryset. When
> I use django_debug_
Hi,
I am new to Django and I am performing some iteration on a queryset. When I
use django_debug_toolbar to look at the SQL usage, I realised that Django
is actually calling the database once in each iteration. Is there a way to
make it call the database only once and somehow store it locally s
5 matches
Mail list logo