Re: [Django] #11369: verbose_name_plural not inherited if base class is abstract.

2010-09-08 Thread Django
#11369: verbose_name_plural not inherited if base class is abstract.
---+
  Reporter:  Beetle_B  | Owner:  ramiro 
   
Status:  assigned  | 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 |  
---+
Changes (by bronger):

 * cc: bron...@physik.rwth-aachen.de (added)

-- 
Ticket URL: 
Django 
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-upda...@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.



Re: [Django] #11369: verbose_name_plural not inherited if base class is abstract.

2010-03-10 Thread Django
#11369: verbose_name_plural not inherited if base class is abstract.
---+
  Reporter:  Beetle_B  | Owner:  ramiro 
   
Status:  assigned  | 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 |  
---+
Changes (by ramiro):

  * owner:  => ramiro
  * status:  new => assigned

-- 
Ticket URL: 
Django 
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-upda...@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.



Re: [Django] #11369: verbose_name_plural not inherited if base class is abstract.

2009-07-19 Thread Django
#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: 
Django 
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
-~--~~~~--~~--~--~---



Re: [Django] #11369: verbose_name_plural not inherited if base class is abstract.

2009-07-18 Thread Django
#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 |  
---+
Changes (by Beetle_B):

  * owner:  Beetle_B =>
  * status:  assigned => new

Comment:

 I don't know what I'm doing "wrong", but somehow this keeps getting
 assigned to me. Trying to reset...

-- 
Ticket URL: 
Django 
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
-~--~~~~--~~--~--~---



Re: [Django] #11369: verbose_name_plural not inherited if base class is abstract.

2009-07-18 Thread Django
#11369: verbose_name_plural not inherited if base class is abstract.
---+
  Reporter:  Beetle_B  | Owner:  Beetle_B   
   
Status:  assigned  | 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 |  
---+
Changes (by Beetle_B):

  * owner:  => Beetle_B
  * status:  new => assigned

-- 
Ticket URL: 
Django 
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
-~--~~~~--~~--~--~---



Re: [Django] #11369: verbose_name_plural not inherited if base class is abstract.

2009-07-18 Thread Django
#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 |  
---+
Changes (by Beetle_B):

  * owner:  Beetle_B =>
  * status:  assigned => new

-- 
Ticket URL: 
Django 
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
-~--~~~~--~~--~--~---



Re: [Django] #11369: verbose_name_plural not inherited if base class is abstract.

2009-07-18 Thread Django
#11369: verbose_name_plural not inherited if base class is abstract.
---+
  Reporter:  Beetle_B  | Owner:  Beetle_B   
   
Status:  assigned  | 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 |  
---+
Changes (by Beetle_B):

  * owner:  nobody => Beetle_B
  * status:  new => assigned

Comment:

 OP here.

 Here's how I remember it (I have the code, but it may have been modified
 since then):

 There's one (perhaps important) difference:

 {{{
 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

 class Category(CategoryMarkup):
 title = models.CharField(max_length=100)

 }}}

 The difference is that the intermediate abstract model (CategoryMarkup)'s
 Meta is subclassing the Meta of the parent. This was as per the docs...

 In any case, your examples are illuminating. So normally,
 verbose_name_plural ''is'' inherited from an abstract base class that
 defines it?

 The point of this bug report was that the docs should state explicitly
 what is or is not inherited. 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).

-- 
Ticket URL: 
Django 
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
-~--~~~~--~~--~--~---



Re: [Django] #11369: verbose_name_plural not inherited if base class is abstract.

2009-07-18 Thread Django
#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:  1  
   
Needs_docs:  0 |   Needs_tests:  0  
   
Needs_better_patch:  0 |  
---+
Changes (by ramiro):

  * has_patch:  0 => 1

-- 
Ticket URL: 
Django 
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
-~--~~~~--~~--~--~---



Re: [Django] #11369: verbose_name_plural not inherited if base class is abstract.

2009-07-18 Thread Django
#11369: verbose_name_plural not inherited if base class is abstract.
+---
  Reporter:  Beetle_B   | Owner:  nobody

Status:  new| Milestone:

 Component:  Documentation  |   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  |  
+---
Comment (by ramiro):

 Some tests I've performed trying to understand this ticket (also available
 at http://dpaste.de/45tH/), the `>> from t11369.models import Category

 >>> c = Category(title=u'Title A')
 >>> c.save()
 >>> print Category._meta.verbose_name_plural
 CategoryBase verbose_name_plural
 >>> print c._meta.verbose_name_plural
 CategoryBase verbose_name_plural

 #==
 # models.py

 from django.db import models

 class CategoryBase(models.Model):
 class Meta:
 abstract = True
 verbose_name_plural = u'CategoryBase verbose_name_plural'

 class CategoryMarkup(CategoryBase):
 class Meta:
 abstract = True
 verbose_name_plural = u'CategoryMarkup verbose_name_plural'

 class Category(CategoryMarkup):
 title = models.CharField(max_length=100)

 #--
 >>> from t11369.models import Category

 >>> c = Category(title=u'Title A')
 >>> c.save()
 >>> print Category._meta.verbose_name_plural
 CategoryMarkup verbose_name_plural
 >>> print c._meta.verbose_name_plural
 CategoryMarkup verbose_name_plural

 #==
 # models.py

 from django.db import models

 class CategoryBase(models.Model):
 class Meta:
 abstract = True
 verbose_name_plural = u'CategoryBase verbose_name_plural'

 class CategoryMarkup(CategoryBase):
 class Meta:
 abstract = True

 class Category(CategoryMarkup):
 title = models.CharField(max_length=100)

 #--
 >>> from t11369.models import Category

 >>> c = Category(title=u'Title A')
 >>> c.save()
 >>> print Category._meta.verbose_name_plural
 
 >>> print c._meta.verbose_name_plural
 

 }}}

-- 
Ticket URL: 
Django 
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
-~--~~~~--~~--~--~---



Re: [Django] #11369: verbose_name_plural not inherited if base class is abstract.

2009-06-24 Thread Django
#11369: verbose_name_plural not inherited if base class is abstract.
+---
  Reporter:  Beetle_B   | Owner:  nobody

Status:  new| Milestone:

 Component:  Documentation  |   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 Alex):

  * component:  Uncategorized => Documentation
  * stage:  Unreviewed => Accepted

Comment:

 The documentation should explicitly state what properties are/are not
 inherited.

-- 
Ticket URL: 
Django 
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
-~--~~~~--~~--~--~---



Re: [Django] #11369: verbose_name_plural not inherited if base class is abstract.

2009-06-24 Thread Django
#11369: verbose_name_plural not inherited if base class is abstract.
+---
  Reporter:  Beetle_B   | Owner:  nobody

Status:  new| Milestone:

 Component:  Uncategorized  |   Version:  1.0   

Resolution: |  Keywords:  verbose_name_plural, 
inheritance, abstract
 Stage:  Unreviewed | Has_patch:  0 

Needs_docs:  0  |   Needs_tests:  0 

Needs_better_patch:  0  |  
+---
Comment (by Beetle_B):

 It's not obvious from those docs.

 It explicitly states that Meta options are inherited if you don't define a
 Meta class. It then goes on to say that some options aren't (giving the
 examples of db_table and abstract). That's about it. Are we supposed to
 guess whether verbose_name_plural is inherited?

 db_table is obvious.
 abstract is not that obvious, which is why it was explicitly explained.

 Likewise, I think stuff like verbose_name_plural is not obvious.

 (Unless I'm missing something else from the docs...)

-- 
Ticket URL: 
Django 
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
-~--~~~~--~~--~--~---



Re: [Django] #11369: verbose_name_plural not inherited if base class is abstract.

2009-06-24 Thread Django
#11369: verbose_name_plural not inherited if base class is abstract.
+---
  Reporter:  Beetle_B   | Owner:  nobody

Status:  new| Milestone:

 Component:  Uncategorized  |   Version:  1.0   

Resolution: |  Keywords:  verbose_name_plural, 
inheritance, abstract
 Stage:  Unreviewed | Has_patch:  0 

Needs_docs:  0  |   Needs_tests:  0 

Needs_better_patch:  0  |  
+---
Changes (by Beetle_B):

 * cc: mu...@nawaz.org (added)
  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

-- 
Ticket URL: 
Django 
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
-~--~~~~--~~--~--~---



[Django] #11369: verbose_name_plural not inherited if base class is abstract.

2009-06-24 Thread Django
#11369: verbose_name_plural not inherited if base class is abstract.
+---
 Reporter:  Beetle_B|   Owner:  nobody  
  
   Status:  new |   Milestone:  
  
Component:  Uncategorized   | Version:  1.0 
  
 Keywords:  verbose_name_plural, inheritance, abstract  |   Stage:  
Unreviewed
Has_patch:  0   |  
+---
 Perhaps this is desired behavior. However, I think the docs should mention
 this explicitly.

 The situation where this arose is that I was creating a CategoryBase class
 (abstract), which was a bit barebones. I then subclassed this to get a
 number of derived classes (all abstract as well) - because I have
 different use cases (some need an HTML description, which will be
 formatted using Textile or Markdown, etc). Then for one particular app, I
 needed one of these, so I subclassed (without making it an abstract
 class).

 I had set verbose_name_plural in the Meta of the original CategoryBase
 class. This did not get inherited...

 In summary:

 CategoryBase --> CategoryMarkup --> Category

 where all but Category were abstract classes.

 Anyway, I'm not arguing it should be inherited - will leave that up to you
 to decide. I just feel that if it isn't, it should be reflected in the
 docs for abstract base classes.

-- 
Ticket URL: 
Django 
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
-~--~~~~--~~--~--~---