Opened 13 years ago
Closed 13 years ago
#16296 closed New feature (wontfix)
django.contrib.comments could offer a config option for default order
Reported by: | FunkyBob | Owned by: | FunkyBob |
---|---|---|---|
Component: | contrib.comments | Version: | 1.3 |
Severity: | Normal | Keywords: | comments |
Cc: | Triage Stage: | Design decision needed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
By default, comments are ordered by oldest-post-first, except in Feed, where it's newest first.
Whilst it's possible to change this by replacing the comment model with your own, this seems a little excessive when a single setting (say, COMMENTS_ORDER ) could make it trivial to change.
The attached patch allows you to either specify 'reverse', which uses ('-submit_date'), or supply your own list/tuple of sorting.
Attachments (1)
Change History (4)
by , 13 years ago
Attachment: | comment_order.patch added |
---|
comment:1 by , 13 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
comment:3 by , 13 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Yeah, I'm not convinced the use-case is common enough to justify another settingTM.
As already pointed out, it's already possible (a proxy model of contrib.comments.models.Comment
on your own comments app if that's all you want).
contrib.comments
is already a bit bloated and I'd be wary of adding more settings, especially considering the fact that it already is possible to have entirely customised comment models.Your proposal is not acceptable as-is because there would be a confusion from a developer's perspective as to what the setting applies to (i.e. to the default ordering, to the feeds, or both?). I also think that accepting 'reverse' isn't ideal -- if anything, you'd only allow to provide an explicit list/tuple of fields.
Marking as DDN for now to leave a chance for a nice API to be proposed. If no clean API can emerge, then this would be a wontfix.