Reputation: 9363
I need to change the inline title
to something else other than the verbose_name
of the class Meta in the model. Is there an attribute to achieve this?
Upvotes: 59
Views: 28069
Reputation: 4619
As documented, you need to set the values of your InlineModelAdmin subclass:
InlineModelAdmin.verbose_name - An override to the verbose_name found in the model’s inner Meta class.
InlineModelAdmin.verbose_name_plural - An override to the verbose_name_plural found in the model’s inner Meta class.
In this example, instead of the title 'Device' we use 'Phone':
class DeviceInline(admin.TabularInline):
model = Device
verbose_name = "Phone"
verbose_name_plural = "My Phones"
Upvotes: 118