Opened 4 years ago

Closed 4 years ago

#29207 closed Bug (invalid)

Admin.py ignores a verbose_name_plural

Reported by: Gus Owned by: nobody
Component: contrib.admin Version: 2.0
Severity: Normal Keywords: verbose_name_plural
Cc: Alex Stovbur Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

If I set up a:

class LoanStatusAdmin(admin.ModelAdmin):
    list_display = ['title']
    verbose_name = "Loan Status"
    verbose_name_plural = "Loan Status"

Keeps showing me: "Loan statuss"

Django: 2.0.3
Python: 3.6.3

Thanks,
Gus

Change History (3)

comment:1 in reply to:  description Changed 4 years ago by Alex Stovbur

Replying to Gus:

If I set up a:

class LoanStatusAdmin(admin.ModelAdmin):
    list_display = ['title']
    verbose_name = "Loan Status"
    verbose_name_plural = "Loan Status"

Keeps showing me: "Loan statuss"

Django: 2.0.3
Python: 3.6.3

Thanks,
Gus

Did you tried to use the Meta class? Something like this:

class LoanStatusAdmin(admin.ModelAdmin):
    list_display = ['title']

    class Meta:
        verbose_name = "Loan Status"
        verbose_name_plural = "Loan Status"
Version 0, edited 4 years ago by Alex Stovbur (next)

comment:2 Changed 4 years ago by Alex Stovbur

Cc: Alex Stovbur added

comment:3 Changed 4 years ago by Claude Paroz

Resolution: invalid
Status: newclosed

verbose_name and verbose_name_plural should be set on the Meta class of the model itself, not the admin model.

Note: See TracTickets for help on using tickets.
Back to Top