{{{
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.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
Did you set the `use_in_migrations` attribute of your manager?
https://docs.djangoproject.com/en/1.9/topics/migrations/#model-managers
--
Ticket URL: <https://code.djangoproject.com/ticket/26589#comment:1>
Comment (by claudep):
I suspected this was in a migration context, but that wasn't stated in the
ticket. Sorry if this was not the case.
--
Ticket URL: <https://code.djangoproject.com/ticket/26589#comment:2>
Comment (by tomasgarzon):
Replying to [comment:2 claudep]:
> I suspected this was in a migration context, but that wasn't stated in
the ticket. Sorry if this was not the case.
Exactly, it was in migrations... Sorry for the inconvenience..
--
Ticket URL: <https://code.djangoproject.com/ticket/26589#comment:3>
* status: new => closed
* resolution: => worksforme
--
Ticket URL: <https://code.djangoproject.com/ticket/26589#comment:4>