#30427: Descriptors not accessible for inherited models.
-------------------------------------+-------------------------------------
Reporter: Jarek Glowacki | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: inherited | Triage Stage: Accepted
descriptor deferred |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jarek Glowacki):
* needs_better_patch: 1 => 0
Comment:
Updated patch to get tests passing.
The proposed patch addresses the problem presented in this ticket, but
feels dirty -- there'll be similar problems if users try to define fields
that clash with method names. But maybe we cross that bridge when we hit
it.
FYI, having the `is_attname_settable` field always return True, causes the
following tests to fail:
```
test_model_check_method_not_shadowed
(check_framework.tests.CheckFrameworkReservedNamesTests)
test_property_and_related_field_accessor_clash
(invalid_models_tests.test_models.OtherModelTests)
```
Interestingly, these tests only ensure checks are firing properly. Nothing
else seems affected. So I guess if we wanted to, we could tweak those
checks and get away with always overriding.
Would you be interested in a competing PR for that, to compare? Would
involve more decisions being made about whether we just drop the checks
that no longer work, or try to rejig them.
--
Ticket URL: <https://code.djangoproject.com/ticket/30427#comment:4>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.d5b5371521dc93b912d7230303846b8e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.