#11369: verbose_name_plural not inherited if base class is abstract.
---------------------------------------------------+------------------------
          Reporter:  Beetle_B                      |         Owner:             
                               
            Status:  new                           |     Milestone:             
                               
         Component:  Database layer (models, ORM)  |       Version:  1.0        
                               
        Resolution:                                |      Keywords:  
verbose_name_plural, inheritance, abstract
             Stage:  Accepted                      |     Has_patch:  1          
                               
        Needs_docs:  0                             |   Needs_tests:  0          
                               
Needs_better_patch:  0                             |  
---------------------------------------------------+------------------------
Comment (by ramiro):

 Replying to [comment:8 Beetle_B]:
 > OP here.
 >
 > Here's how I remember it (I have the code, but it may have been modified
 since then):
 > ...
 > The difference is that the intermediate abstract model
 (CategoryMarkup)'s Meta is subclassing the Meta of the parent. This was as
 per the docs...
 Correct.
 >
 > In any case, your examples are illuminating. So normally,
 verbose_name_plural ''is'' inherited from an abstract base class that
 defines it?
 Correct.
 >
 > The point of this bug report was that the docs should state explicitly
 what is or is not inherited.
 Oops, sorry. From the tracking of the ticket history I had understood this
 ticket was initially opened to report the mis-behavior and later changed
 to be about the docs, that's why I changed is component to ORM.

 > Your examples have, in a sense, confused me, and is suggesting an
 inconsistent behavior (in which case a separate ticket needs to be
 opened). On the one hand, it is inherited (if the immediate parent defines
 it). On the other, it is not (even when the intermediate abstract class's
 Meta is inheriting directly from the parent's Meta).

 Correct, and the patch solves it, the regression test case added shows
 this with an very similar example: It fails without the patch and works
 after applying it.

 Anyway, if the patch (or another solution) is committed to solve the
 problem that Django is treating the `verbose_name_plural` in a way
 different to `verbose_name` when abstract model inheritance is involved
 then there won't be any special cases to document (apart for the cases
 already covered: `abstract` is not inherited and `db_table` is but it
 won't make any sense). That is, all the meta model options are inherited
 just like in the non-abstract scenario and IMHO there won't be any need to
 explicitely list them.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/11369#comment:12>
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to