django-rest-framework icon indicating copy to clipboard operation
django-rest-framework copied to clipboard

patch for partial update using STRICT_PARTIAL_UPADTE setting and update_fields

Open iamr0b0tx opened this issue 3 years ago • 4 comments

using a new configuration flag to decide if to enforce a partial update

Concerning the issue of all field updates during partial update discussed here #2648. I propose we use a REST_FRAMEWORK setting which defaults to False to condition the use of update_fields

iamr0b0tx avatar May 14 '22 21:05 iamr0b0tx

@sevdog PR has new changes. test included

iamr0b0tx avatar May 29 '22 21:05 iamr0b0tx

@sevdog tests updated

iamr0b0tx avatar Jun 02 '22 19:06 iamr0b0tx

Good, now let's wait for a maintainer to see this.

sevdog avatar Jun 03 '22 06:06 sevdog

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.

stale[bot] avatar Aug 12 '22 13:08 stale[bot]

Hi @iamr0b0tx. Thanks for writing this. I'm very interested in this feature. Did you close it for a reason?

gibsonbailey avatar Nov 30 '22 20:11 gibsonbailey

I am not sure if the original creator of the library is open to add more API surface to the framework unless that is to align with latest django releases or bug fix/elimination of technical debt

Correct - I don't think we should be adding more API surface area at this point.

Adding further built-in features/API at this point is useful to a small number of people, while adding a bit of risk, a bit of ongoing maintainance effort, and even more stuff in the docs for users to have to figure out if they do or don't need it.

Having a clear policy of "we're keeping in line with new Django releases, and fixing bugs" feels like a good balance to me now.

lovelydinosaur avatar Dec 01 '22 10:12 lovelydinosaur

I agree with @auvipy and @tomchristie

@gibsonbailey you can check out django-rest-framework-extensions I think you can implement it directly in code as a new BaseSerializer others will inherit without even installing the lib if you understand what they did

iamr0b0tx avatar Dec 01 '22 11:12 iamr0b0tx

@gibsonbailey you can check out django-rest-framework-extensions I think you can implement it directly in code as a new BaseSerializer others will inherit without even installing the lib if you understand what they did

closing as per this

auvipy avatar Dec 01 '22 12:12 auvipy

Fair enough. Thank you all for explaining that.

gibsonbailey avatar Dec 03 '22 20:12 gibsonbailey