-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Validate fields and their lookups during filtering.
- Adds a mixin that validates both that the field has been defined, and that the optional lookup requested for the field is enabled for the field. - This implies that any filtering field and their lookups *must* be explicitly defined. - This further implies that special fields for pagination, ordering, or any other such usage must be defined as well, this is done in the mixin class' approved_base_fields list. - We also allow filtering on relation-based fields, but we do not validate these at all. - Also removes BaseCVSFilter from JSONFieldExactFilter and CIDRFieldExactFilter to prevent list context from breaking filters.
- Loading branch information
Showing
4 changed files
with
88 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters