如何mongoengine ListField(ImageField())
How to mongoengine ListField(ImageField())
我有如下模型
class Post(Document):
id = IntField(primary_key=True)
text = StringField()
images = ListField(ImageField())
我需要将每个 post 的图像保存在名为 images
的列表中,如上面的代码所示。但是我不知道如何在 ListField
中使用 ImageField
。谷歌搜索并没有带我去任何地方。
如何节省?
我有如下模型
class Post(Document):
id = IntField(primary_key=True)
text = StringField()
images = ListField(ImageField())
我需要将每个 post 的图像保存在名为 images
的列表中,如上面的代码所示。但是我不知道如何在 ListField
中使用 ImageField
。谷歌搜索并没有带我去任何地方。
如何节省?