summaryrefslogtreecommitdiff
path: root/django/forms/models.py
diff options
context:
space:
mode:
authorAnssi Kääriäinen <akaariai@gmail.com>2013-11-09 14:25:15 +0200
committerTim Graham <timograham@gmail.com>2014-12-23 10:54:25 -0500
commitf233bf47dde1d481108142c8d6b4bb3b3d8c6d08 (patch)
treec96fdc0a4ee19bde709ff6dc4e6d35131e2c7463 /django/forms/models.py
parent6e08bde8c4525dda7d82bbf55b4b45a6e16213da (diff)
Fixed #21414 -- Removed RelatedObject and deprecated Field.related.
Diffstat (limited to 'django/forms/models.py')
-rw-r--r--django/forms/models.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/django/forms/models.py b/django/forms/models.py
index 7ca4954358..c57c8af0b9 100644
--- a/django/forms/models.py
+++ b/django/forms/models.py
@@ -883,8 +883,7 @@ class BaseInlineFormSet(BaseModelFormSet):
@classmethod
def get_default_prefix(cls):
- from django.db.models.fields.related import RelatedObject
- return RelatedObject(cls.fk.rel.to, cls.model, cls.fk).get_accessor_name().replace('+', '')
+ return cls.fk.rel.get_accessor_name(model=cls.model).replace('+', '')
def save_new(self, form, commit=True):
# Use commit=False so we can assign the parent key afterwards, then