1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #21414 -- Removed RelatedObject and deprecated Field.related.

This commit is contained in:
Anssi Kääriäinen
2013-11-09 14:25:15 +02:00
committed by Tim Graham
parent 6e08bde8c4
commit f233bf47dd
17 changed files with 318 additions and 285 deletions

View File

@@ -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