closeio/flask-mongorest

Filtering list issue

Opened this issue · 0 comments

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]
}