Changes between Version 1 and Version 2 of Ticket #34388, comment 2


Ignore:
Timestamp:
Mar 7, 2023, 1:50:24 AM (21 months ago)
Author:
Carlton Gibson

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #34388, comment 2

    v1 v2  
    1717Maybe 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.
    1818
    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.
     19Essentially 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.
    2020
    2121Also from the PR:
Back to Top