I use the updated_at timestamp off of the instance in order to generate my object etags – for that I need to be able to retrieve the instance, which I current do by simply calling view_instance.get_object() – however, this will use the lookup_field and kwarg passed to filter the queryset.
Which is fine. Unless that field changed in an the request, e.g. it was an update.
Being able to grab the instance, or at the very least the response.data in the event that the etag is being calculated after method evaluation would be super handy for this use case.
@chibisov I'll invest the time fixing the rest of the implementation if you give me some feedback as to whether this is something you'd ever consider merging
I use the
updated_at
timestamp off of the instance in order to generate my object etags – for that I need to be able to retrieve the instance, which I current do by simply callingview_instance.get_object()
– however, this will use thelookup_field
and kwarg passed to filter the queryset.Which is fine. Unless that field changed in an the request, e.g. it was an update.
Being able to grab the instance, or at the very least the response.data in the event that the etag is being calculated after method evaluation would be super handy for this use case.