mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Renamed descriptor classes for related objects.
The old names were downright confusing. Some seemed to mean the opposite of what the class actually did. The new names follow a consistent nomenclature: (Forward|Reverse)(ManyToOne|OneToOne|ManyToMany)Descriptor. I mentioned combinations that do not exist in the docstring in order to help people who would search for them in the code base.
This commit is contained in:
parent
2409a4241a
commit
e542e81b39
10 changed files with 61 additions and 58 deletions
|
@ -106,7 +106,7 @@ class ManyToOneNullTests(TestCase):
|
|||
def test_assign_with_queryset(self):
|
||||
# Ensure that querysets used in reverse FK assignments are pre-evaluated
|
||||
# so their value isn't affected by the clearing operation in
|
||||
# ForeignRelatedObjectsDescriptor.__set__. Refs #19816.
|
||||
# ReverseManyToOneDescriptor.__set__. Refs #19816.
|
||||
self.r2.article_set = [self.a2, self.a3]
|
||||
|
||||
qs = self.r2.article_set.filter(headline="Second")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue