Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update view responses to return modified data #353

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

smartspot2
Copy link
Member

The Django views are currently inconsistent in what they return for PUT or POST requests. It's hard to say what the general convention or consensus seems to be regarding this point, but in our specific use case, it's easier to handle responses in the frontend queries if all endpoints return the modified or created resource. This way, we don't need to pass down any other fields from parent components (we'd only need the immediately relevant fields for the request, not the effects of the request), and the query handler has all the information necessary to invalidate any queries.

In the process of making this change, the views files have also been reformatted.

@smartspot2 smartspot2 added enhancement New feature or request python Pull requests that update Python code labels Nov 27, 2022
@smartspot2 smartspot2 self-assigned this Nov 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant