-
-
Notifications
You must be signed in to change notification settings - Fork 300
Open
Description
When using a proxy model. Using ProxyModel.base_objects.all() will correctly return a QuerySet of base model instances downcasted as proxy model instances.
But using base_objects prints out this deprecation warning:
:1: DeprecationWarning: Using PolymorphicModel.base_objects is deprecated.
Use PolymorphicModelBase.objects.non_polymorphic() instead.
The problem with using a PolymorphicModelBase.objects.non_polymorphic() QuerySet is that it won't downcast its instances to be proxy model instances.
I have proxy models that contain different properties and methods but refer to the same base model. Without .base_objects there is no way to get this type of QuerySet downcasted with proxy model instances.
Metadata
Metadata
Assignees
Labels
No labels