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
Post a Comment