#11369: verbose_name_plural not inherited if base class is abstract. ---------------------------------------------------+------------------------ Reporter: Beetle_B | Owner: nobody Status: new | Milestone: Component: Database layer (models, ORM) | Version: 1.0 Resolution: | Keywords: verbose_name_plural, inheritance, abstract Stage: Accepted | Has_patch: 0 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 0 | ---------------------------------------------------+------------------------ Changes (by ramiro):
* component: Documentation => Database layer (models, ORM) Comment: As can be seen above, problem occurs when there is one or more intermediate abstract classes between the one containing the `verbose_name_plural` definition and the non-abstract one. In the example posted by the OP, the `CategoryMarkup` model needs to define its own inner `Meta` class basause it has to explicitely specify it is a abstract class. Then, if it is desired it inherits the `verbose_name_plural` attribute from `CategoryBase` we need to make sure it extends its Meta inner class by subclassing it: {{{ #!python class CategoryBase(models.Model): class Meta: abstract = True verbose_name_plural = u'CategoryBase verbose_name_plural' class CategoryMarkup(CategoryBase): class Meta(CategoryBase.Meta): abstract = True #... }}} OP didnĀ“t paste his models se we don't know if he was taking this in account. But even if this usage error isn't present in user's models there is a Django bug (`Category.verbose_name_plural` values shown are <django.utils.functional.__proxy__...` as above and they evaluate to "Categorys" in the admin). IMHO it should treat `verbose_name_plural` in a way consistent with `verbose_name`. I'm changing the component field of this ticket accordingly. -- Ticket URL: <http://code.djangoproject.com/ticket/11369#comment:6> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---