Closed singhravi1 closed 5 years ago
The oldest origin point I could find is llinked below. I presume it allows the middleware to go up the change to continue on before working on actual logging.
But it is in the base class and basically overriding itself?
@singhravi1 Sorry, my first response didn't understand your questions intention. If you look at the installation docs, you see that this class is a mixin. But the other pre-requisite is that it has to work with an APIView class. Which inherits from a Django View class. Which has a finalize_response
method. This mixin at a high level ensures that the API library completes its work first in its finalize_response
method before moving to create a log in this library. I hope that makes sense.
Oh, okay. Now i get it. I was confused as i did not know about the finalize_rezponse method in APIView and the super was called on Base Exceprion class which is the current class only.
Hi everyone,
Can anyone please explain why the following line is needed?
https://github.com/aschn/drf-tracking/blob/57344c65fe39923ab2debbf581d9fd0dbc46b2fa/rest_framework_tracking/base_mixins.py#L50
Thanks