Make set_value a static method for Serializers
As an alternative to #7671, let the method be overridden if needed.
As the function is only used for serializers, it has a better place in the Serializer class than standalone in the fields file.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I do think this PR is still pertinent as it would make it so I wouldn't have to override an unrelated method as I currently do.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I repeat.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Okay...
I'm open to considering this. We're pretty much not adding public API to REST framework anymore, but let's take a look.
I'd suggest start off by changing it to not be a staticmethod. Agreed that it functionally is, but we don't use that much through REST framework, so let's stick with consistency.
That edit should also bump the test cases to run against this pull request.
That edit should also bump the test cases to run against this pull request.
does that mean some additional tests should be added or tests should be adjusted as well?
@auvipy There were no tests specifically for set_value() so I've added a couple cases from the method doc.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I'm still interested in this, and waiting for a reply from @auvipy.
I'm still interested in this, and waiting for a reply from @auvipy.
can you edit the PR headline as per the suggested change by Tom?
can you edit the PR headline as per the suggested change by Tom?
Done :)