mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +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:
@@ -1,11 +1,10 @@
|
||||
from django.db import models
|
||||
from django.db.models.fields.related import \
|
||||
ReverseSingleRelatedObjectDescriptor
|
||||
from django.db.models.fields.related import ForwardManyToOneDescriptor
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
from django.utils.translation import get_language
|
||||
|
||||
|
||||
class ArticleTranslationDescriptor(ReverseSingleRelatedObjectDescriptor):
|
||||
class ArticleTranslationDescriptor(ForwardManyToOneDescriptor):
|
||||
"""
|
||||
The set of articletranslation should not set any local fields.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user