I am thinking of moving an existing webpage to wagtail. However, the main part of the page is image galleries, a total of several thousand images and several hundred galleries. In addition, the page is divided into several sites, and editors are allowed to change the content for only one specific site.
Because collections are not hierarchical, they do not provide a convenient way to collect images in image galleries, selection fields become frighteningly long as their number grows.
I defined a page -derived class that contains a ParentalKey for images, which is enough to implement an image gallery. However, it is not very convenient to select, say, 200 images for the gallery one at a time. So, I thought that I should extend ImageChooserPanel to something like MultipleImageChooserPanel , which would allow me to select and load multiple images. Code for uploading multiple images should be available in wagtail.
After reading the code for wagtailimages/views/multiple.py , wagtailadmin/edit_handlers.py and all the corresponding parent classes, I still donβt see how the modal ImageChooserPanel determines the selected image and how its id returned. Presumably most of this happens in JS, however I cannot find any hints where to look for the appropriate code, nor any hints on how to extend it.
Can I extend a modal ImageChooserPanel ? Can someone point me a piece of code to start with?
source share