summaryrefslogtreecommitdiff
path: root/tests/schema/fields.py
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2015-09-20 17:51:25 +0200
committerAymeric Augustin <aymeric.augustin@m4x.org>2015-09-21 22:20:42 +0200
commite542e81b39e8610b70cf1d68f95ece0279028765 (patch)
tree92da80cf497dbab79d05d5ec050927bfe107c153 /tests/schema/fields.py
parent2409a4241a07bcdb1be4f3c99bf1aacc87189ebf (diff)
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.
Diffstat (limited to 'tests/schema/fields.py')
-rw-r--r--tests/schema/fields.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/schema/fields.py b/tests/schema/fields.py
index 8499477d65..30357b1061 100644
--- a/tests/schema/fields.py
+++ b/tests/schema/fields.py
@@ -1,6 +1,6 @@
from django.db import models
from django.db.models.fields.related import (
- RECURSIVE_RELATIONSHIP_CONSTANT, ManyRelatedObjectsDescriptor,
+ RECURSIVE_RELATIONSHIP_CONSTANT, ManyToManyDescriptor,
ManyToManyField, ManyToManyRel, RelatedField,
create_many_to_many_intermediary_model,
)
@@ -42,7 +42,7 @@ class CustomManyToManyField(RelatedField):
super(CustomManyToManyField, self).contribute_to_class(cls, name, **kwargs)
if not self.remote_field.through and not cls._meta.abstract and not cls._meta.swapped:
self.remote_field.through = create_many_to_many_intermediary_model(self, cls)
- setattr(cls, self.name, ManyRelatedObjectsDescriptor(self.remote_field))
+ setattr(cls, self.name, ManyToManyDescriptor(self.remote_field))
self.m2m_db_table = curry(self._get_m2m_db_table, cls._meta)
def get_internal_type(self):