Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Filtering list issue #110

Open
Odselmaa opened this issue May 9, 2017 · 0 comments
Open

Filtering list issue #110

Odselmaa opened this issue May 9, 2017 · 0 comments

Comments

@Odselmaa
Copy link

Odselmaa commented May 9, 2017

Hello!
How I can filter list by multiple values? By single value is working.
My model is (I wanna filter "languages" field):

class User(Document):
firstname = StringField(required=True, max_length=512)
lastname = StringField(required=True, max_length=512)
email = EmailField(required=True, max_length=256)
languages = ListField(StringField())

class UserResource(Resource):
document = User
schema = schemas.User
filters = {
'languages': [ops.Exact, ops.In, ops.Contains],
'firstname': [ops.Startswith]
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant