-
Notifications
You must be signed in to change notification settings - Fork 19
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
Standalone validation (T30324) #167
base: master
Are you sure you want to change the base?
Conversation
…into validate-only
We check if the action is not performed, and thus aborted internally by a BinderSkipSave exception, for POST, PUT, MULTI-PUT and DELETE.
binder/views.py
Outdated
params = QueryDict(request.body) | ||
raise BinderSkipSave | ||
else: | ||
raise BinderRequestError('Standalone validation not enabled. You must enable this feature explicitly.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add in the error a small description on how to enable this standalone_validation? e.g. add allow_standalone_validation = True on the model Foo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my latest commit
This implements standalone validation, so only checking if there are validation errors without actually executing the create/update/delete action.
See
docs/api.md
for further explanation.