Sage Abdullah
aee4f42a7d
Add tests and docs for inspect view in ModelViewSet
2023-10-09 19:01:54 +01:00
Sage Abdullah
4593eabff8
Add usage view to ModelViewSet
...
- Move permission_required from snippets' UsageView to generic UsageView
- Fix breadcrumbs item missing capfirst()
- Move usage view config in SnippetViewSet to ModelViewSet
2023-10-04 11:20:30 +01:00
Sage Abdullah
bc2004cf7b
Add history view to ModelViewSet
2023-10-04 10:42:00 +01:00
Matt Westcott
7b64f08e74
Allow ChooserViewSet to be filtered by specified URL parameters
2023-09-06 15:58:36 +01:00
Matt Westcott
cbeb9a2512
Docs and release note for ChooserViewSet.get_object_list ( #10851 )
2023-09-04 18:45:39 +01:00
Christer Jensen
0edf22ccbc
Allow overriding export_headings
via ModelViewSet
2023-08-30 12:22:15 +01:00
Sage Abdullah
9a2d53d0cf
Move SnippetViewSet.list_per_page to ModelViewSet
2023-08-30 10:31:16 +01:00
Sage Abdullah
66216852b8
Move SnippetViewSet.list_export and export_filename to ModelViewSet
2023-08-30 10:30:17 +01:00
Sage Abdullah
ccbd6849f3
Move SnippetViewSet.search_fields and search_backend_name definition to ModelViewSet
2023-08-30 10:29:29 +01:00
Sage Abdullah
1fa124fe82
Move SnippetViewSet.list_filter and filterset_class definition to ModelViewSet
2023-08-30 10:26:38 +01:00
Sage Abdullah
cd222898fd
Move SnippetViewSet.list_diplay definition to ModelViewSet
2023-08-22 16:34:51 +01:00
Sage Abdullah
91a539d797
Add docs and tests for custom template overrides in ModelViewSets
2023-08-22 15:56:42 +01:00
Sage Abdullah
65739c6925
Add ModelViewSet.add_to_reference_index to allow opting out of the ReferenceIndex
2023-08-16 11:42:11 +01:00
Sage Abdullah
c7b5c9a04d
Update viewsets documentation to cover ViewSetGroups and menu item registration
2023-08-15 11:53:44 +01:00
Matt Westcott
9ff0f10310
Mention model_name in docstrings
2023-08-15 01:31:16 +01:00
Matt Westcott
485545a983
Allow ViewSet subclasses to customise url_prefix and url_namespace logic
...
Alternative approach to #10766 , as per https://github.com/wagtail/wagtail/pull/10766#issuecomment-1675043897
2023-08-15 01:31:16 +01:00
LB Johnston
995809a318
Adopt data attribute usage of SwapController (w-swap) for all header searches
...
- Removes six inline scripts completely, no longer relying on window.headerSearch
- Update the fallback Stimulus Swap controller afterLoad to be a deprecated method
- Add upgrade considerations
- Fix regression from d554cbe310
where manually submitting page search results would load the partial, not full page response
- Closes #9950
2023-07-18 07:09:28 +10:00
Sage Abdullah
0bebe532e8
Add docs and tests for snippets inspect view
2023-07-17 17:19:11 +01:00
Sage Abdullah
0550b03dad
Allow customising the spreadsheet file name via SnippetViewSet.export_filename
2023-07-12 09:18:11 +01:00
Sage Abdullah
428b7914e2
Add docs and tests for exporting snippets listing
2023-07-12 09:18:09 +01:00
Sage Abdullah
6ec734f836
Add separate headings for each snippets view customisation
2023-05-24 11:06:00 +01:00
Sage Abdullah
7ba2098d1a
Add docs and tests for grouped snippets registration
2023-04-19 15:13:42 +01:00
Sage Abdullah
5fb4d6316f
Allow SnippetViewSet.model to be defined directly on the class
2023-04-19 15:13:42 +01:00
Sage Abdullah
dde58c718d
Add docs and tests for separate menu item registrations for Snippets
2023-04-19 15:13:42 +01:00
Sage Abdullah
66c0ef48e9
Add docs for setting panels/edit_handler on SnippetViewSet
2023-04-19 13:24:17 +01:00
Sage Abdullah
167471b1f7
Allow customising the search_fields and search backend to use via SnippetViewSet ( #10290 )
2023-04-18 00:06:09 +01:00
Sage Abdullah
3965ceedfa
Allow default ordering of Snippets IndexView to be specified via SnippetViewSet ( #10276 )
2023-04-17 23:58:20 +01:00
Sage Abdullah
87cbf01894
Add docs and tests for overriding SnippetViewSet.get_queryset()
2023-04-14 12:34:11 +01:00
Sage Abdullah
dc6c0b0949
Allow overriding SnippetViewSet template prefix
2023-04-13 17:53:58 +01:00
Sage Abdullah
f2ab3ae774
Add docs and tests for Snippets template overrides
2023-04-13 17:53:58 +01:00
Sage Abdullah
1992c72791
Add missing docs for chooser_viewset_class
2023-04-13 17:53:58 +01:00
Sage Abdullah
bcbaafd116
Add docs and tests for snippets listing filters via list_filter
2023-04-03 10:24:30 +02:00
Sage Abdullah
f533ab219d
Allow customising the number of snippets per page on the listing view
2023-03-23 14:15:42 +00:00
Sage Abdullah
b713a1753e
Allow admin URL customisation for snippet chooser views via SnippetViewSet
2023-03-23 13:54:59 +00:00
Sage Abdullah
e6d920d435
Add docs and tests for snippets admin URL customisation
2023-03-23 13:54:49 +00:00
Daniel Kirkham
198388bf55
Add docs and tests for customising snippet icons
2023-03-22 15:15:30 +00:00
Matt Westcott
c5513d098a
Implement mechanism to pass the 'multiple' URL parameter (and any other specified ones) on links / form actions within generic chooser modal
2023-01-18 14:31:08 +00:00
Matt Westcott
3872de44d7
Add chooser view endpoints for returning multiple results
...
Extend the existing 'chosen' view so that it returns a single-item list when the URL parameter `multiple` is passed, and add a 'chosen_multiple' view that accepts multiple `id` URL parameters and returns the corresponding results as a list.
2023-01-18 14:31:08 +00:00
Sage Abdullah
1952ecbb63
Add the ability to lock snippets that extend LockableMixin
2022-12-14 11:10:14 +00:00
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