: sorting by another table
On Feb 6, 3:50 pm, <[EMAIL PROTECTED]> wrote:
> I have a Sale model that foreign keys into an APN model, which foreign keys
> into a Zip model. I'd like to sort my Sale objects by the 'zip' field on the
> Zip model, but
>
>
[EMAIL PROTECTED] написав(ла):
> > I have a Sale model that foreign keys into an APN model, which
> > foreign keys into a Zip model. I'd like to sort my Sale objects by
> > the 'zip' field on the Zip model, but
> >
> > Sale.objects.select_related().order_by('sales_zip.zip')
> >
> > doesn't work (1
[EMAIL PROTECTED] написав(ла):
> I have a Sale model that foreign keys into an APN model, which
> foreign keys into a Zip model. I'd like to sort my Sale objects by
> the 'zip' field on the Zip model, but
>
> Sale.objects.select_related().order_by('sales_zip.zip')
>
> doesn't work (1054, "Unknow
On Feb 6, 3:50 pm, <[EMAIL PROTECTED]> wrote:
> I have a Sale model that foreign keys into an APN model, which foreign keys
> into a Zip model. I'd like to sort my Sale objects by the 'zip' field on the
> Zip model, but
>
> Sale.objects.select_related().order_by('sales_zip.zip')
>
> does
I have a Sale model that foreign keys into an APN model, which foreign keys
into a Zip model. I'd like to sort my Sale objects by the 'zip' field on the
Zip model, but
Sale.objects.select_related().order_by('sales_zip.zip')
doesn't work (1054, "Unknown column 'sales_zip.zip' in 'order
5 matches
Mail list logo