From f70a0882a3d916cfd59c31d6a6f4316dce104466 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Mon, 1 Feb 2010 14:13:47 +0000 Subject: [PATCH] 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 --- django/contrib/admin/helpers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/contrib/admin/helpers.py b/django/contrib/admin/helpers.py index ef6ad66ece..3c1febd26b 100644 --- a/django/contrib/admin/helpers.py +++ b/django/contrib/admin/helpers.py @@ -196,9 +196,9 @@ class InlineAdminFormSet(object): yield InlineAdminForm(self.formset, form, self.fieldsets, self.opts.prepopulated_fields, None, self.readonly_fields, model_admin=self.model_admin) - 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): fk = getattr(self.formset, "fk", None)