0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-29 17:36:49 +01:00
Commit Graph

13 Commits

Author SHA1 Message Date
Sage Abdullah
0a0bd30fad Allow customising snippet listing columns with list_display 2022-09-28 10:39:48 +01:00
Sage Abdullah
a7249a851f Document SnippetViewSet and how to customise it 2022-09-27 10:18:18 +01:00
Matt Westcott
9aeb2e3e49 Ensure telepath adapter gets registered for document chooser widget
Fixes #9010. `wagtail.documents.widgets` is no longer reliably imported on startup now that the chooser widget is constructed within wagtail.documents.views.chooser instead, so the telepath adapter wasn't getting register. This meant that DocumentChooserBlocks in StreamField were using the base chooser implementation, which didn't include customisations such as populating the title field from the file upload field. Fix this by making ChooserViewSet responsible for registering the telepath adapter.
2022-08-17 18:24:18 +01:00
Matt Westcott
b4bc681865 Fix DocumentChooserBlock deconstruction for custom document models
Fixes #8989. The previous fix #9004 failed for custom document models because ChooserViewset assigns an internal name for the ChooserBlock class based on the model name, and if this is anything other than Document it won't match the name DocumentChooserBlock that it's exposed under in wagtail.documents.blocks. Fix this by replacing the `block_class` property with a `get_block_class` method that lets us specify the class name. As a bonus, user code that defines chooser blocks no longer has to directly hack the `__module__` attribute.
2022-08-16 20:50:04 +01:00
Matt Westcott
f9fe6d0ca8 Documentation for generating chooser blocks via ChooserViewSet 2022-08-10 14:53:41 +10:00
Matt Westcott
161dd69c8a Implement generating a StreamField ChooserBlock from ChooserViewSet 2022-08-10 14:53:41 +10:00
Matt Westcott
02d836fe3e Make per_page configurable on viewsets 2022-08-05 08:34:14 +10:00
Matt Westcott
30054eda39 Add a 'create' view with a GET request handler 2022-07-04 13:48:35 +01:00
Matt Westcott
4dd3483617 Add a (non-functional) 'create' form to generic chooser modal 2022-07-04 13:48:35 +01:00
Matt Westcott
372965ef6a Put headers in markdown rather than rst 2022-06-12 15:47:24 +10:00
Matt Westcott
865df1153b Documentation for ChooserViewSet 2022-06-12 15:47:24 +10:00
Matt Westcott
b00d19b3a0 Documentation for ModelViewSet 2022-06-12 15:47:24 +10:00
Matt Westcott
b4d3cf1c30 Docs for base ViewSet class 2022-06-12 15:47:24 +10:00