SerializationSpecPlugin can override modify_queryset() and get_value() for the two steps in its lifecycle: fetching any required data, and then outputting a value based on that.
It can also specify a serialization_spec which is then used to build the queryset -- but not to output the result. I feel like it should be possible instead of overriding the whole get_value() process to have a way to say "Give me the instance, let me DO THINGS to it, but then serialize according to the spec as you were going to anyway."
SerializationSpecPlugin
can overridemodify_queryset()
andget_value()
for the two steps in its lifecycle: fetching any required data, and then outputting a value based on that.It can also specify a
serialization_spec
which is then used to build the queryset -- but not to output the result. I feel like it should be possible instead of overriding the wholeget_value()
process to have a way to say "Give me the instance, let me DO THINGS to it, but then serialize according to the spec as you were going to anyway."