You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@inforian Thanks for making a PR. If you can briefly explain how this betters the library I am all for it. Write somes tests would be great. Lastly, add some quick documentation on how it should be installed.
Would this be a breaking change for current users? Or would does it compliment the mixin?
The main idea is to avoid redundancy of using Mixin in every viewset. Instead their must be a way where you have to mention just once and that will be applicable everywhere (Some configurable settings can be provided).
So I decided to write a Django middleware for the same which will use this mixin functions like :
In process_request -> initial
process_exception -> handle_exception
process_response -> finalize_response
But during Implementation I faced some issues like :
- Your Mixin use DRF Request Object but Middleware will pass HttpRequest object , So some things may not be accessible in Mixin like request.data .
In finalize_response some response do not have rendered_content
However I fixed above issues but then I realize This repo aims at DRF not Django , So a Middlware won't be a good option. But I still think there must be a single way of enabling this logging functionality instead of use Mixin in every Viewset.
So I wanted to contribute and enable above functionality (keeping the old one too) but first I wanted to know your views and Any thoughts on what will be the best way to do so ?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.