summaryrefslogtreecommitdiff
path: root/django/contrib/admin/helpers.py
diff options
context:
space:
mode:
authorPaulo <commonzenpython@gmail.com>2016-06-18 22:03:25 -0400
committerTim Graham <timograham@gmail.com>2016-06-21 14:26:47 -0400
commit9c2d5a8d333277cc1b482a9d05f174cf4d09f24c (patch)
tree5eecd822e6ff3ee94551f1e2d18dab120d34719e /django/contrib/admin/helpers.py
parentea4665066b651e0e2730f2e2d85fcef9d7ac7966 (diff)
Fixed #26729 -- Allowed overriding a form field's label/help_text in Form.__init__() for TabularInline.
Diffstat (limited to 'django/contrib/admin/helpers.py')
-rw-r--r--django/contrib/admin/helpers.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/admin/helpers.py b/django/contrib/admin/helpers.py
index a9db82ae78..d5cf38e2ea 100644
--- a/django/contrib/admin/helpers.py
+++ b/django/contrib/admin/helpers.py
@@ -279,7 +279,7 @@ class InlineAdminFormSet(object):
'help_text': help_text_for_field(field_name, self.opts.model),
}
else:
- form_field = self.formset.form.base_fields[field_name]
+ form_field = self.formset.empty_form.fields[field_name]
label = form_field.label
if label is None:
label = label_for_field(field_name, self.opts.model, self.opts)