#25897: Managers defined on non-abstract base classes are in fact inherited by
child classes.
-------------------------------------+-------------------------------------
     Reporter:  poleha               |                    Owner:  poleha
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  1.8
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  manager,             |             Triage Stage:  Accepted
  inheritance                        |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by sir-sigurd):

 * needs_better_patch:   => 0
 * version:  master => 1.8
 * needs_docs:   => 0
 * needs_tests:   => 0
 * stage:  Unreviewed => Accepted


Comment:

 steps to reproduce:
 {{{
 class TestManager(models.Manager):
     pass

 class Test(models.Model):
     objects = TestManager()
     other_objects = TestManager()

 class TestInherited(Test):
     pass
 }}}

 {{{
 In [2]: TestInherited.objects
 Out[2]: <django.db.models.manager.Manager at 0x7fd8e8ae2550>

 In [3]: TestInherited.other_objects
 Out[3]: <geotest.models.TestManager at 0x7fd8e8a74390>
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25897#comment:1>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.40b6fdba4c8778ad421db724f7b27fe6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to