Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed models/related.py BoundRelatedObject

The class wasn't used anywhere except in RelatedObject.bind(), which
wasn't used anywhere. The class had one method defined as
NotImplemented, yet the class wasn't subclassed anywhere. In short, the
class was dead code.
  • Loading branch information...
commit 56f34f9f225026ccd8e36b2cf917d09b8f55d393 1 parent 3647c0a
@akaariai akaariai authored
Showing with 0 additions and 14 deletions.
  1. +0 −14 django/db/models/related.py
View
14 django/db/models/related.py
@@ -10,17 +10,6 @@
'from_field to_field from_opts to_opts join_field '
'm2m direct')
-class BoundRelatedObject(object):
- def __init__(self, related_object, field_mapping, original):
- self.relation = related_object
- self.field_mappings = field_mapping[related_object.name]
-
- def template_name(self):
- raise NotImplementedError
-
- def __repr__(self):
- return repr(self.__dict__)
-
class RelatedObject(object):
def __init__(self, parent_model, model, field):
self.parent_model = parent_model
@@ -58,9 +47,6 @@ def editable_fields(self):
def __repr__(self):
return "<RelatedObject: %s related to %s>" % (self.name, self.field.name)
- def bind(self, field_mapping, original, bound_related_object_class=BoundRelatedObject):
- return bound_related_object_class(self, field_mapping, original)
-
def get_accessor_name(self):
# This method encapsulates the logic that decides what name to give an
# accessor descriptor that retrieves related many-to-one or
Please sign in to comment.
Something went wrong with that request. Please try again.