Changes between Version 1 and Version 2 of Ticket #34388, comment 2
- Timestamp:
- Mar 7, 2023, 1:50:24 AM (21 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #34388, comment 2
v1 v2 17 17 Maybe it's worth it but — and I realise I'm always saying this to you Tim 😬 — the reference to the Choices class is unused in Django, and I worry about adding API for external packages, when it would be much better (for all involved) for them to keep control of it themselves. 18 18 19 Essentially you want the field to maintain a reference to the Choices class, so you can inspect it later, but in this case I'd think a decorator in drf-spectacular adding the necessary annotation would be much more coherent, than having Django maintain the (from it's POV) other idle reference.19 Essentially you want the field to maintain a reference to the Choices class, so you can inspect it later, but in this case I'd think a decorator in drf-spectacular adding the necessary annotation would be much more coherent, than having Django maintain the (from it's POV) otherwise idle reference. 20 20 21 21 Also from the PR: