summaryrefslogtreecommitdiff
path: root/django/forms
diff options
context:
space:
mode:
Diffstat (limited to 'django/forms')
-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