Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed ManyToManyRel.singular, which wasn't being used anymore.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2828 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 1f57fcac988a57b90ac0008d82127ba5539b82ea 1 parent 2b551de
Adrian Holovaty adrianholovaty authored
Showing with 2 additions and 5 deletions.
  1. +2 −5 django/db/models/fields/related.py
7 django/db/models/fields/related.py
View
@@ -564,7 +564,7 @@ def contribute_to_related_class(self, cls, related):
class ManyToManyField(RelatedField, Field):
def __init__(self, to, **kwargs):
kwargs['verbose_name'] = kwargs.get('verbose_name', None)
- kwargs['rel'] = ManyToManyRel(to, kwargs.pop('singular', None),
+ kwargs['rel'] = ManyToManyRel(to,
num_in_admin=kwargs.pop('num_in_admin', 0),
related_name=kwargs.pop('related_name', None),
filter_interface=kwargs.pop('filter_interface', None),
@@ -660,8 +660,6 @@ def contribute_to_related_class(self, cls, related):
# Add the descriptor for the m2m relation
setattr(cls, related.get_accessor_name(), ManyRelatedObjectsDescriptor(related))
- self.rel.singular = self.rel.singular or self.rel.to._meta.object_name.lower()
-
# Set up the accessors for the column names on the m2m table
self.m2m_column_name = curry(self._get_m2m_column_name, related)
self.m2m_reverse_name = curry(self._get_m2m_reverse_name, related)
@@ -703,10 +701,9 @@ def __init__(self, to, field_name, num_in_admin=0, edit_inline=False,
self.multiple = False
class ManyToManyRel:
- def __init__(self, to, singular=None, num_in_admin=0, related_name=None,
+ def __init__(self, to, num_in_admin=0, related_name=None,
filter_interface=None, limit_choices_to=None, raw_id_admin=False, symmetrical=True):
self.to = to
- self.singular = singular or None
self.num_in_admin = num_in_admin
self.related_name = related_name
self.filter_interface = filter_interface
Please sign in to comment.
Something went wrong with that request. Please try again.