eg..
class Page(Document) tags = ListField(StringField())
In this case, we can find out the value in the tag list like this.
Page.objects(tags='coding')
if the tags are like ['coding', 'x', 'y'], then the document will be matched ...
but my question is how can I find out the value not in the list box.
my wrong code will be ...
Page.objects(tags!='coding')
or
Page.objects(tags__not = 'coding')
or
Page.objects(tags__not__in = 'coding')
but .. they do not just work.
How can I request a document that does not have a given value in a ListField?
Anderson
source share