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):
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
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
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'.
>
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
5 matches
Mail list logo