Opened 17 years ago
Closed 13 years ago
#6786 closed New feature (wontfix)
Ordering choices after translation
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Core (Other) | Version: | dev |
Severity: | Normal | Keywords: | order choices field |
Cc: | Triage Stage: | Design decision needed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | yes | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Added order
parameter to constructor of db.models.Field class, that specifies ordering of choices list.
Ordering is performed after translation, so localized lists are ordered correctly.
The ordering was tested successfully both on CharField with choices and ForeignKey field.
Attachments (2)
Change History (6)
by , 17 years ago
Attachment: | choices_order.diff added |
---|
comment:1 by , 17 years ago
Renamed parameter from "order" to "sort"
and tested the system again.
Everything is working!
comment:2 by , 17 years ago
Has patch: | set |
---|---|
Needs tests: | set |
Triage Stage: | Unreviewed → Design decision needed |
comment:3 by , 14 years ago
Severity: | → Normal |
---|---|
Type: | → New feature |
comment:4 by , 13 years ago
Easy pickings: | unset |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
UI/UX: | unset |
Discussion with Carl: sorting choices for display is not a model-level concern, it is a form-level concern and this solves it at the right level. the right solution is for forms that want to display choices in a different order to override init and resort their field's choices.
changes in db.models.Field constructor and it's docs