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
Implement meta-field key filtering #318
Implement meta-field key filtering #318
Conversation
098f4b5
to
fea6182
Compare
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.
Naming, otherwise looks good
fea6182
to
8d0b929
Compare
Do we want this filter for all models with a meta-field? |
I think this can be useful everywhere, yeah. |
This commit implements a "meta_HasKey"-filter. This is done in "MetaFilterSet" which is a subclass of "FilterSet". For this to work, the meta-field is now a "generic.GenericScalar()".
8d0b929
to
c717681
Compare
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.
Aah, I like this! Now it's really generic and extensible, for when we need deeper filters into the meta field.. 👍
Since projectcaluma/caluma#318, the meta field returns an actual object instead of a JSONString.
Since projectcaluma/caluma#318, the meta field returns an actual object instead of a JSONString.
This commit implements a "meta_HasKey"-filter.
For this to work, the meta-field is now a "generic.GenericScalar()".
This implementation is up for discussion and only implemented for Form.meta atm. If we decide that this is the way to go, we can implement it for the other models as well.