鹡鸰
我的型号代码:
class HomePage(Page):
images = models.ImagesField(max_count = 20) // How to do it right?
content_panels = Page.content_panels + [
ImagesChooserPanel('images'),
]
请帮忙!
鹡鸰
我的型号代码:
class HomePage(Page):
images = models.ImagesField(max_count = 20) // How to do it right?
content_panels = Page.content_panels + [
ImagesChooserPanel('images'),
]
请帮忙!
由流场解决
images = StreamField([
('image', ImageChooserBlock()),
])
(悲哀地)你不能这样
images = models.ImagesField(max_count = 20)
但是有多种方法可以将多个图像关联到同一个模型
image1 = models.ImagesField(upload_tp='somewhere') image2 = models.ImagesField(upload_tp='somewhere')