Opened 4 months ago
Closed 4 months ago
#35736 closed Bug (invalid)
Incorrect pluralization of model names in the admin panel
Reported by: | Sanjeev Holla S | Owned by: | Sanjeev Holla S |
---|---|---|---|
Component: | Uncategorized | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Sanjeev Holla S | Triage Stage: | Unreviewed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Whenever we register a model, in the admin panel the names of these models are shown in the plural form. But as of now, a sufix of 's' is being added to the name of the model. This is not correct in all the cases. So for example, if the name of the model is company
then it will be shown as Companys
on the admin page. So this can be fixed by having the correct plural forms of the model names.
So inorder to fix this, when the verbose_name_plural
is set, we can derive the correct suffix that needs to be added from the verbose_name
(ex: 's', 'es', or 'ies'). Let me know if I am wrong anywhere.
(This is my first ticket, so apologies if anything doesn’t meet the standards. :) )
Change History (3)
comment:1 by , 4 months ago
Version: | 5.0 → dev |
---|
comment:2 by , 4 months ago
comment:3 by , 4 months ago
Resolution: | → invalid |
---|---|
Status: | assigned → closed |
UI/UX: | unset |
Hello Sanjeev, thank you for this ticket. As Claude says, the model name pluralization can be customized using verbose_name_plural
.
Your original description is a bit unclear on whether you are just seeking confirmation about your statements, in which case that would be a user support request; or if you think there is a bug in Django, in which case I can't tell from your description what would be the bug.
Because of that, and since the goal of this issue tracker is to track issues about Django itself, I'll be closing this ticket as invalid following the ticket triaging process. If you find out that this is indeed a bug in Django, please re-open with the specific details and please be sure to include a small Django project to reproduce or a failing test case.
If you are looking for user support, please note that there are several user support channels available, refer to TicketClosingReasons/UseSupportChannels for ways to get help.
I'm not sure to understand. When the default pluralization is not right, then you have to set
verbose_name_plural
in the model definition to provide the proper plural yourself and all is good, isn't it?