Re: Ordering by __str__

2006-08-03 Thread Adrian Holovaty
On 7/28/06, Seth Buntin <[EMAIL PROTECTED]> wrote: > I have a model class that returns the string as below: > > def __str__(self): > return "%s %s" % (self.program, self.course_number) > > In the list_display I have: > list_display = ('__str__', 'uploaded') > > I want to be able to order b

Re: Ordering by __str__

2006-07-28 Thread Seth Buntin
It is the same model. Seth --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMA

Re: Ordering by __str__

2006-07-28 Thread [EMAIL PROTECTED]
Is program is another model? Is there an __str__ method for it? Chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsu

Ordering by __str__

2006-07-28 Thread Seth Buntin
I have a model class that returns the string as below: def __str__(self): return "%s %s" % (self.program, self.course_number) In the list_display I have: list_display = ('__str__', 'uploaded') I want to be able to order by my __str__ value, but I don't know how. Can this be done? I ha