Django Array contains a field -


i using django, mongoengine. have model classes inscriptions list, , want docs have id in list.

classes = classes.objects(inscriptions__contains=request.data['inscription']).all()

perhaps i'm missing something...but seems should using .filter():

classes = classes.objects.filter(inscriptions__contains=request.data['inscription']) 

Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -