Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django admin change plural model names

My Django (Grappelli theme) admin lists all my apps and then the model names are displayed in plural form. To convert the name to plural, Django adds an 's' to the name of the model, however some of these are incorrect. For example, 'Product categories' becomes 'Product categorys'

How can I change the names displayed in the admin views for these?

like image 411
jason Avatar asked Feb 18 '13 15:02

jason


1 Answers

You need to specify a verbose_name_plural attribute in your model's Meta subclass.

Check: https://docs.djangoproject.com/en/1.10/ref/models/options/#django.db.models.Options.verbose_name_plural for more info.

like image 76
Brandon Avatar answered Sep 28 '22 05:09

Brandon