We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, I have a class with a custom manager defined by: objects = PolymorphicManager.from_queryset(PointOfInterestQuerySet)()
objects = PolymorphicManager.from_queryset(PointOfInterestQuerySet)()
The proxy model:
class PointOfInterestGlobalSummary(PointOfInterest): class Meta: proxy = True verbose_name = _('Dashboard - Global') verbose_name_plural = _('Dashboard - Global')
Running some queries:
>>> PointOfInterest.objects.all().count() 139534 >>> PointOfInterestGlobalSummary.objects.all().count() 0
The solution was to define the proxy model with a normal manager: objects = models.Manager() The queries:
objects = models.Manager()
>>> PointOfInterest.objects.all().count() 139534 >>> PointOfInterestGlobalSummary.objects.all().count() 139534
Is this normal behavior? If so, maybe we should add some documentation?
Cheers
The text was updated successfully, but these errors were encountered:
Add option to model meta class to prevent proxy models being polymorphic
6990167
Fixes jazzband#376 jazzband#390
7fca75a
Successfully merging a pull request may close this issue.
Hello,
I have a class with a custom manager defined by:
objects = PolymorphicManager.from_queryset(PointOfInterestQuerySet)()
The proxy model:
Running some queries:
The solution was to define the proxy model with a normal manager:
objects = models.Manager()
The queries:
Is this normal behavior? If so, maybe we should add some documentation?
Cheers
The text was updated successfully, but these errors were encountered: