Re: Ordering with respect to a function in models?

2006-03-03 Thread Luke Plant
On Friday 03 March 2006 01:01, Malcolm Tredinnick wrote: > Unfortunately, Meta.ordering seems to want a real field, not a method > (which Admin.list_display can take) or a property. > > So am I missing something, or is this even a common need for other > people? Meta.ordering does ordering in th

Re: Ordering with respect to a function in models?

2006-03-03 Thread akaihola
You're not alone. I need this too and couldn't find a solution. --~--~-~--~~~---~--~~ 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

Ordering with respect to a function in models?

2006-03-02 Thread Malcolm Tredinnick
Consider something like a tag hierarchy model: class Tag(models.Model): name = models.CharField(maxlength = 50, unique = True) parent = models.ForiegnKey('self', related_name='child', null = True, blank = True)