django-object-actions icon indicating copy to clipboard operation
django-object-actions copied to clipboard

Removing QuerySetIsh removes a feature

Open titusz opened this issue 9 years ago • 3 comments

I was updating to 0.6.0 and it broke due to the missing QuerySetIsh class. It might not be an obvious use case, but I am using QuerySetIsh with isinstance to determine if an action was called from the change list view or from the change form view. Now it seems to be impossible to find out how the action was called.

titusz avatar Dec 15 '15 12:12 titusz

Off the top of my head, we could:

  • change the decorator to pass in that information, but that changes the signature of things
  • monkey patch the queryset to have this information

any other ideas?

crccheck avatar Dec 15 '15 21:12 crccheck

Hmmm. Maybe I can just skip using the decorator alltogether and simply check if queryset really is a QuerySet?

titusz avatar Dec 15 '15 22:12 titusz

you could. The logic is really simple now to turn the instance into a queryset. You could re-write just what you need for your version of Django.

crccheck avatar Dec 16 '15 02:12 crccheck