0๐
โ
You could give a verbose_name to SingleImageInline
:
class SingleImageInline(generic.GenericTabularInline):
model = Image
extra = 1
max_num = 1
can_delete = False
verbose_name = "logo"
verbose_name_plural = "logos"
EDIT
subclass SingleImageInline
, then put there the verbose_name
class SingleImageInline(generic.GenericTabularInline):
model = Image
extra = 1
max_num = 1
can_delete = False
class SingleImageInlineOtherName(SingleimageInline):
verbose_name = "logo"
verbose_name_plural = "logos" # bit redundant as Django automatically adds 's' to plural names, but it's just for the purpose
class SponsorAdmin(admin.ModelAdmin):
fieldsets = [
('Basic Info', {
'fields': ['name']
}),
]
list_display = ['name']
search_fields = ['name']
inlines = [SingleImageInlineOtherName, ] # use the subclass here
๐คJ. Ghyllebert
1๐
Sure you can
class SingleImageInline(generic.GenericTabularInline):
model = Image
extra = 1
max_num = 1
can_delete = False
verbose_name = "Logo"
verbose_name_plural = "Logos"
- [Answer]-Sending data via POST vs storing in database
- [Answer]-Django admin unable to find subclass of models.CharField
- [Answer]-How do I make my django application perform a job at a fixed time everyday?
Source:stackexchange.com