[Fixed]-Access a value from a list field in django

1👍

One possible solution may be using raw queries with help of MongoDBManager:

from django_mongodb_engine.contrib import MongoDBManager

class UserModel(models.Model):
    name = models.CharField()
    email = models.CharField()
    profiles = ListField()

    objects = MongoDBManager()

and then:

UserModel.objects.raw_query({'profiles': 'Read'})

Leave a comment