#30931: Cannot override get_FOO_display() in Django 2.2+.
-------------------------------------+-------------------------------------
Reporter: Jim Ouwerkerk | Owner: Carlton
Type: | Gibson
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 2.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Carlton Gibson):
Yes, on 2.2 they would. But it's a change of behaviour from 2.1 (which is
the point here I take it).
The new `__new__()` behaviour is correctâ„¢.
So we have a choice:
* Add code to `Field`, which IMO is very much the wrong place. (Field
shouldn't need to examine the `__dict__` of the class it's being applied
to — that way lies madness, or
* Document the correct way to customize this, requiring 0 code changes.
I've opted for the latter.
--
Ticket URL: <https://code.djangoproject.com/ticket/30931#comment:12>
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/070.f76b75eadc235c51ad10ff9674f5a972%40djangoproject.com.