#34388: Added support for direct usage of Choices classes on model fields -------------------------------------+------------------------------------- Reporter: T. Franzel | Owner: nobody Type: New feature | Status: closed Component: Database layer | Version: dev (models, ORM) | Severity: Normal | Resolution: wontfix Keywords: | Triage Stage: | Unreviewed Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Changes (by Carlton Gibson):
* cc: Adam Johnson (added) Comment: Thanks for the reply. Good hustle. I’m quite sympathetic to accepting a Choices class directly here. Expressive APIs for the win. There is though a constant stream of complaints that run from “Django’s loose APIs mean it can’t be typed” to (even) “Django is holding back typing in Python” because of this. Generally adding a Union to a type isn’t going to please folks concerned about this. However maybe that’s Python typing’s problem and not ours 🤔 I’ll cc Adam and let him decide. I’m really doubtful about storing references for 3rd party packages. (That way lies madness…) Even if we were to add that, the crystal ball 🔮 says that the day would arrive when even you’d which you were in control of it. But I’ll see If others have views… -- Ticket URL: <https://code.djangoproject.com/ticket/34388#comment:6> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/01070186cb64271e-b7ba2140-1811-409f-99af-cd9ea89380f2-000000%40eu-central-1.amazonses.com.