Opened 2 days ago
#35566 new New feature
Support get_FOO_display() on GeneratedField
Reported by: | Ronie Martinez | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 5.0 |
Severity: | Normal | Keywords: | |
Cc: | Ronie Martinez | Triage Stage: | Unreviewed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Please add support for get_FOO_display() on GeneratedField.
We initially used a normal IntegerField with choices [IntegerField(choices=choices, ...)] and then running a SQL to make this field a generated field. We then migrated to GeneratedField while maintaining the output_field similar to our old one.
However, we found that get_FOO_display() don't work anymore and we had to write a method for this, instead.
Note:
See TracTickets
for help on using tickets.