Open Eluzive opened 5 years ago
We're also encountering this issue. :(
Any updates on this?
Any updates??
This is by design. For now you can work around this by overriding the manager's get_queryset
:
class MyModelManager(PolymorphicManager):
def get_queryset(self):
qs = self.queryset_class(self.model, using=self._db, hints=self._hints)
return qs
class MyModel(models.Usuario):
objects = MyModelManager()
class Meta:
proxy = True
Hello,
First off thanks for creating this package!
I am running into an issue now where we needed to create two different admin pages and creating proxy models seems like a good idea to use the same model have this separation or grouping. However, when registering the proxy models to their own separate ModelAdmins, the get_queryset() returns an empty set and results are not shown.
I've posted on SO
When I tried creating the object using the regular Django Model class, I am able to query the proxy model and get the created object.
However, when I use the PolymorphicModel and query for proxy model, the queryset is empty.
Shouldn't we expect the Queryset to contain the Person object we created?