Wagtail:如何配置 ImageChooserPanel 以每页分页更多图像?
Wagtail: How to configure ImageChooserPanel to paginate with more images per page?
默认情况下 ImageChooserPanel 每页分页 20 个图像。是否可以每页显示更多图像(例如 40 张)?
我认为 ImageChooserPanel 没有配置选项。
目前,图像选择器分页的图像数量 is hardcoded to 12(我不确定你为什么说 20),但我认为让页面大小可配置是个好主意。
随时创建 a new issue or submit a pull request into the Wagtail 存储库。
UPD 2017 年 5 月 23 日
图片分页的情况很少:
- 图像选择器模态 window(
ImageChooserPanel
和 ImageChooserBlock
classes)。两个图像选择器都使用 wagtail.wagtailimages.views.chooser.chooser
view that returns a page with 12 images。我以为问题是关于这个案例的,因为你在最初的问题中提到了ImageChooserPanel
class。
- 图片列表视图(
wagtail.wagtailimages.views.images.index
). It uses the default pagination value (20 items, at the moment) which is specified in the wagtail.utils.pagination.paginate
实用函数。
默认情况下 ImageChooserPanel 每页分页 20 个图像。是否可以每页显示更多图像(例如 40 张)?
我认为 ImageChooserPanel 没有配置选项。
目前,图像选择器分页的图像数量 is hardcoded to 12(我不确定你为什么说 20),但我认为让页面大小可配置是个好主意。
随时创建 a new issue or submit a pull request into the Wagtail 存储库。
UPD 2017 年 5 月 23 日
图片分页的情况很少:
- 图像选择器模态 window(
ImageChooserPanel
和ImageChooserBlock
classes)。两个图像选择器都使用wagtail.wagtailimages.views.chooser.chooser
view that returns a page with 12 images。我以为问题是关于这个案例的,因为你在最初的问题中提到了ImageChooserPanel
class。 - 图片列表视图(
wagtail.wagtailimages.views.images.index
). It uses the default pagination value (20 items, at the moment) which is specified in thewagtail.utils.pagination.paginate
实用函数。