Matt Westcott

Results 450 comments of Matt Westcott

I'm not so sure that the repeated calls to `page.get_ancestors` would be generating N+1 queries - Django is generally pretty good at deferring querying to the last possible moment, and...

I'm in favour of having the parent page's model specify the ordering, and in fact I'd take it one step further: specifying an order should _override the manual (menu) ordering_....

Hi @coredumperror, I think you misunderstand what I'm proposing. Effectively it would be a two-step change: 1) We change the Explorer behaviour so that it always sorts by menu-order position...

In writing the above, it occurs to me that there are a couple of trickier auto-ordering situations that we're likely to encounter: - The example of a staff directory being...

I guess there's no reason why it has to be done in one go - the sort_title stuff can happen as a later phase of development. (Changing the behaviour to...

Probably easiest to explain it with the code: ``` class PersonPage(Page): first_name = models.CharField(max_length=255) last_name = models.CharField(max_length=255) biography = RichTextField(blank=True) def save(self): self.title = "%s %s" % (self.first_name, self.last_name) self.sort_title...

Sure, that would work! I suppose one problem with conceptually decoupling `sort_key` from `title` is that it's no longer correct for the explorer to show the 'title' column heading as...