jedie / django-reversion-compare

Add compare view to django-reversion for comparing two versions of a reversion model.
https://pypi.org/project/django-reversion-compare/
315 stars 105 forks source link

Make it possible to override object retrieval in `compare_view` method. #166

Open NikAzanov opened 2 years ago

NikAzanov commented 2 years ago

In the BaseCompareVersionAdmin.compare_view method, the current implementation of object retrieval uses get_object_or_404 for the model. This method uses _default_manager, which makes it impossible to work with logically deleted objects. It would be nice to have a separate method for getting an object or something like that, so it can be easily overridden and work with the needed queryset.

jedie commented 2 years ago

Pull requests are welcome. Plesse with a complete test ;)