Re: Ordering by foreign key, class Meta

2007-11-13 Thread Malcolm Tredinnick
On Wed, 2007-11-14 at 00:00 +, Michael wrote: > Thanks Malcolm, this helped me on one problem I had. But, I've > another similar problem but in my case, I've multiple foreign keys, so > I'm not sure what to do about the database table name part. > > My models: > class Member(models.Model):

Re: Ordering by foreign key, class Meta

2007-11-13 Thread Michael
Thanks Malcolm, this helped me on one problem I had. But, I've another similar problem but in my case, I've multiple foreign keys, so I'm not sure what to do about the database table name part. My models: class Member(models.Model): # first_name, last_name, etc. class Meta: ordering

Re: Ordering by foreign key, class Meta

2007-11-04 Thread Brot
On Oct 19, 3:11 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Fri, 2007-10-19 at 06:54 -0700, äL wrote: > > I would like to order a list in a view by foreign key. If I try > >orderinghow in the > > code below my list is ordered by 'person'. And this means that the > > list > > ist order

Re: Ordering by foreign key, class Meta

2007-10-19 Thread Malcolm Tredinnick
On Fri, 2007-10-19 at 06:54 -0700, äL wrote: > I would like to order a list in a view by foreign key. If I try > ordering how in the > code below my list is ordered by 'person'. And this means that the > list > ist ordered by the ID of the table Person. But I need a list ordered > by 'nameLast'. >

Ordering by foreign key, class Meta

2007-10-19 Thread äL
I would like to order a list in a view by foreign key. If I try ordering how in the code below my list is ordered by 'person'. And this means that the list ist ordered by the ID of the table Person. But I need a list ordered by 'nameLast'. Thus I changed ordering 'person' into 'person.nameLast'. B