i used that for mine and it always worked! Mine was for a list of
child records by date, but child.objects.all()[0] always gave me the
most recent object.
J
On Sep 2, 7:23 am, mwebs <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I want to perform a lookup an getting the object with the highest
> integ
Oh thanks,
I think I have overlooked it :-)
On 2 Sep., 16:35, Jarek Zgoda <[EMAIL PROTECTED]> wrote:
> Wiadomość napisana w dniu 2008-09-02, o godz. 16:23, przez mwebs:
>
>
>
>
>
> > Hello,
>
> > I want to perform a lookup an getting the object with the highest
> > integer value.
> > The Model l
Wiadomość napisana w dniu 2008-09-02, o godz. 16:23, przez mwebs:
>
> Hello,
>
> I want to perform a lookup an getting the object with the highest
> integer value.
> The Model looks something like this:
>
> MyModel:
> name =
> number = models.PositiveIntegerField()
>
> class Meta:
> o
Hello,
I want to perform a lookup an getting the object with the highest
integer value.
The Model looks something like this:
MyModel:
name =
number = models.PositiveIntegerField()
class Meta:
ordering = [-number]
So I figured out this:
highest = MyModel.objects.all()[0]
Is t
4 matches
Mail list logo