#26589: apps.get_model doesn't build own Custom Manager
----------------------------------------------+---------------------------
Reporter: tomasgarzon | Owner: nobody
Type: Bug | Status: new
Component: Database layer (models, ORM) | Version: 1.9
Severity: Normal | Keywords: apps, manager
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------------------+---------------------------
Something seems to be wrong when we use apps.get_model.
{{{
class A(models.Model):
objects = CustomClassAManager()
}}}
Bad:
{{{
Class1 = apps.get_model("miapp", "A")
print(Class1.objects)
<django.db.models.manager.Manager object at 0x7f1815c69198>
}}}
Class1.objects should be a instance of "CustomClassAManager".
Good:
{{{
from miapp.models import A
print(A.objects)
<miapp.managers.CustomClassAManager object at 0x...>
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26589>
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/054.80ca70a27a476670d87ffcd0ff6c17c2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.