1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Fixed #18549 -- Fixed heading for inlines with a OneToOneField.

Used verbose_name instead of verbose_name_plural.
This commit is contained in:
Timothy McCurrach
2021-01-15 14:32:54 +00:00
committed by Mariusz Felisiak
parent 13409a0c0d
commit 0aff3fd711
5 changed files with 27 additions and 4 deletions

View File

@@ -9,8 +9,8 @@ from .models import (
Holder, Holder2, Holder3, Holder4, Holder5, Inner, Inner2, Inner3,
Inner4Stacked, Inner4Tabular, Inner5Stacked, Inner5Tabular, NonAutoPKBook,
NonAutoPKBookChild, Novel, NovelReadonlyChapter, OutfitItem,
ParentModelWithCustomPk, Poll, Profile, ProfileCollection, Question,
ReadOnlyInline, ShoppingWeakness, Sighting, SomeChildModel,
ParentModelWithCustomPk, Person, Poll, Profile, ProfileCollection,
Question, ReadOnlyInline, ShoppingWeakness, Sighting, SomeChildModel,
SomeParentModel, SottoCapo, Teacher, Title, TitleCollection,
)
@@ -292,6 +292,14 @@ class TeacherAdmin(admin.ModelAdmin):
inlines = [StudentInline]
class AuthorTabularInline(admin.TabularInline):
model = Author
class FashonistaStackedInline(admin.StackedInline):
model = Fashionista
site.register(TitleCollection, inlines=[TitleInline])
# Test bug #12561 and #12778
# only ModelAdmin media
@@ -318,3 +326,4 @@ site.register([Question, Inner4Stacked, Inner4Tabular])
site.register(Teacher, TeacherAdmin)
site.register(Chapter, inlines=[FootNoteNonEditableInlineCustomForm])
site.register(OutfitItem, inlines=[WeaknessInlineCustomForm])
site.register(Person, inlines=[AuthorTabularInline, FashonistaStackedInline])