mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #29184 -- Made TabularInline respect model form's Meta.labels and help_texts.
This commit is contained in:
committed by
Tim Graham
parent
3c4ff21763
commit
274e3e27f3
@@ -206,6 +206,8 @@ class SomeChildModelForm(forms.ModelForm):
|
||||
widgets = {
|
||||
'position': forms.HiddenInput,
|
||||
}
|
||||
labels = {'readonly_field': 'Label from ModelForm.Meta'}
|
||||
help_texts = {'readonly_field': 'Help text from ModelForm.Meta'}
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
@@ -215,6 +217,7 @@ class SomeChildModelForm(forms.ModelForm):
|
||||
class SomeChildModelInline(admin.TabularInline):
|
||||
model = SomeChildModel
|
||||
form = SomeChildModelForm
|
||||
readonly_fields = ('readonly_field',)
|
||||
|
||||
|
||||
site.register(TitleCollection, inlines=[TitleInline])
|
||||
|
||||
Reference in New Issue
Block a user