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

Implement meta-field key filtering #318

Merged
merged 1 commit into from Mar 8, 2019

Conversation

open-dynaMIX
Copy link
Member

@open-dynaMIX open-dynaMIX commented Mar 8, 2019

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.

@open-dynaMIX open-dynaMIX changed the title Implement meta-field key filtering WIP: Implement meta-field key filtering Mar 8, 2019
Copy link
Contributor

@winged winged left a 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

caluma/form/filters.py Outdated Show resolved Hide resolved
@open-dynaMIX
Copy link
Member Author

Do we want this filter for all models with a meta-field?

@czosel
Copy link
Contributor

czosel commented Mar 8, 2019

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()".
@open-dynaMIX open-dynaMIX changed the title WIP: Implement meta-field key filtering Implement meta-field key filtering Mar 8, 2019
@open-dynaMIX open-dynaMIX requested a review from winged March 8, 2019 12:57
Copy link
Contributor

@winged winged left a 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.. 👍

@open-dynaMIX open-dynaMIX merged commit fdc8781 into projectcaluma:master Mar 8, 2019
@open-dynaMIX open-dynaMIX deleted the filter_meta_by_key branch March 8, 2019 14:20
czosel added a commit to czosel/ember-caluma that referenced this pull request Mar 11, 2019
Since projectcaluma/caluma#318, the meta field
returns an actual object instead of a JSONString.
czosel added a commit to czosel/ember-caluma that referenced this pull request Mar 11, 2019
Since projectcaluma/caluma#318, the meta field
returns an actual object instead of a JSONString.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants