简体   繁体   中英

How to mongoengine ListField(ImageField())

I have a model as bellow

class Post(Document):
    id = IntField(primary_key=True)
    text = StringField()
    images = ListField(ImageField())

and I need to save images for each post in a list named images as in the code above. But I don't know how to use ImageField inside a ListField . Googling didn't take me anywhere. How could saving be done?

After googling with the term ImageGridFsProxy , I found that it was an issue for others and discussed here . But the final answer is definitely here .

Thanks.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM