The `ChangeList` does not support custom queryset subclasses
|Reported by:||jbronn||Owned by:||Malcolm Tredinnick|
|Severity:||Keywords:||admin changelist queryset custom|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
QuerySet classes (like GeoDjango's
GeoQuerySet) can't be merged with regular
QuerySet objects (using
& operators). This problem manifests itself when trying to use search fields with a model that uses a
TypeError ... Cannot merge querysets of different types ('GeoQuerySet' and 'QuerySet'.
The root cause is that
ChangeList hard-codes using QuerySet for the search fields.
In my patch
ChangeList takes advantage of existing information to determine the type of queryset being used and store it in a
root_query_set_class attribute that is used when performing searches.
Change History (7)
comment:1 Changed 9 years ago by
|Summary:||The `ChangeList` does not support custom queryset classes → The `ChangeList` does not support custom queryset subclasses|