如何mongoengine ListFieldImageField

问题描述

我有一个波纹管模型

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

,我需要将每个帖子的图片保存在名为images的列表中,如上面的代码所示。但是我不知道如何在ImageField中使用ListField。谷歌搜索并没有带我到任何地方。 如何保存?

解决方法

搜索了ImageGridFsProxy一词后,我发现这对其他人来说是个问题,并讨论了here。但最终答案肯定是here

谢谢。