1
0
mirror of https://github.com/django/django.git synced 2024-12-25 18:46:22 +00:00

Fixed #12700 - Take read-only fields into account when rendering the empty form for dynamic inlines.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12368 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jannis Leidel 2010-02-01 14:13:47 +00:00
parent be90eadfb9
commit f70a0882a3

View File

@ -196,9 +196,9 @@ class InlineAdminFormSet(object):
yield InlineAdminForm(self.formset, form, self.fieldsets, yield InlineAdminForm(self.formset, form, self.fieldsets,
self.opts.prepopulated_fields, None, self.readonly_fields, self.opts.prepopulated_fields, None, self.readonly_fields,
model_admin=self.model_admin) model_admin=self.model_admin)
yield InlineAdminForm(self.formset, self.formset.empty_form, yield InlineAdminForm(self.formset, self.formset.empty_form,
self.fieldsets, self.opts.prepopulated_fields, None) self.fieldsets, self.opts.prepopulated_fields, None,
self.readonly_fields, model_admin=self.model_admin)
def fields(self): def fields(self):
fk = getattr(self.formset, "fk", None) fk = getattr(self.formset, "fk", None)