Wykres commitów

15523 Commity (e463c80250941a5489d1edf53c6951218281ac45)

Autor SHA1 Wiadomość Data
Jake Howard e463c80250
Prevent memory exhaustion when running wagtail_update_image_renditions with many renditions
This reduces the memory overhead of the command, allowing it to be run on sites with lots of images.
Whilst that may reduce performance, I've also added a `select_related` and massively simplified the
`purge_only` path to counter
2023-07-12 16:31:57 +01:00
Thibaud Colas 366e7f0153
Add support for --template argument to wagtail start 2023-07-12 13:18:31 +01:00
Antoni Martyniuk 47df43d722 Finish `attrs` support for FieldPanel and other Panels
- Closes #10133
- Rework from original PR #10323
- Add documentation
2023-07-12 20:25:09 +10:00
4the4ryushin a1aeefa6ea Add initial support for Panels with attrs
- Rename shared/attrs template for reuse in other files
- Add `attrs` to Panel and a `BASE_ATTRS` property for reuse
- Add initial unit tests
2023-07-12 20:25:09 +10:00
Sage Abdullah a5bea1ccaf
Release notes for #10626 2023-07-12 09:21:12 +01:00
Sage Abdullah db0b985484
Use flex display for listing header .right class
Workaround until #10148 is fixed
2023-07-12 09:18: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 0a731b37f4
Add the ability to export snippet listing via SnippetViewSet.list_export 2023-07-12 09:14:16 +01:00
Sage Abdullah a2487fe6d9
Extract is_export and paginate_by configuration to SpreadsheetExportMixin 2023-07-12 09:14:16 +01:00
Sage Abdullah 45ab2630ef
Extract spreadsheet export buttons to shared export_buttons.html template 2023-07-12 09:14:16 +01:00
Sage Abdullah 85dfb2c7e7
Remove unused addbutton class usage
There is no mention of this class anywhere in the codebase.
2023-07-12 09:14:15 +01:00
Matt Westcott dc747d7106 Ensure that page ID and classname are correctly set on the td element 2023-07-11 10:28:12 +01:00
Matt Westcott 61f3cfed38 Standardise on passing show_locale_labels as a kwarg on the table constructor
instead of plucking it out of the parent template context, or making it a flag on the column definition
2023-07-11 10:28:12 +01:00
Matt Westcott 0b3f4dc1e8 Remove unused page listing templates and tags 2023-07-11 10:28:12 +01:00
Matt Westcott 5a0828a066 Pass on the global 'perms' object to PageTitleColumn's context
This is required for the site globe icon to show (for users with site edit permission)
2023-07-11 10:28:12 +01:00
Matt Westcott 99a3febcad Fix is_paginated to correctly honour get_paginate_by methods returning None
Checking self.paginate_by here is not valid, as that doesn't get updated from the class-level value in the case that get_paginate_by is overridden. Django's BaseListView provides an is_paginated variable, so this could be omitted entirely - however, this returns False in the case that a view has pagination in place but only returns a single page of results, and this doesn't match the semantics we want in Wagtail (where a single page of results should display "Page 1 of 1").
2023-07-11 10:28:12 +01:00
Matt Westcott 910490ae2f Pass aria-description to table 2023-07-11 10:28:12 +01:00
Matt Westcott 61168d62fa Incorporate parent page title into the title text of reordering links 2023-07-11 10:28:12 +01:00
Matt Westcott 03c0f28797 Add get_table_kwargs mechanism to BaseListingView
This allows passing additional kwargs to the table constructor. Use this to pass use_row_ordering_attributes to PageTable, rather than patching the already-created table object.
2023-07-11 10:28:12 +01:00
Matt Westcott f057e65c99 Add generic title text to column reordering links 2023-07-11 10:28:12 +01:00
Matt Westcott aa0bf8f29d Make row index / count available in cell context, and reinstate alt text for ordering cells 2023-07-11 10:28:12 +01:00
Matt Westcott cbd6a1328c Convert page listing view to tables framework 2023-07-11 10:28:12 +01:00
Matt Westcott 01752bbc90 Support setting arbitrary attributes on table rows 2023-07-11 10:28:12 +01:00
Matt Westcott 9a1862adf8 Pick up show_locale_labels from context instead of making it an option on PageTitleColumn 2023-07-11 10:28:12 +01:00
Matt Westcott 77b9ac0582 Change pagination include on pages index view to match generic listings 2023-07-11 10:28:12 +01:00
Matt Westcott 32ff36446b Have pages.BulkActionsColumn inherit from BulkActionsCheckboxColumn 2023-07-10 15:21:46 +01:00
Matt Westcott f014ab6a34 Restore 'unpublished' row style 2023-07-10 15:21:46 +01:00
Matt Westcott 69b7ed0815 Use table component for page search results 2023-07-10 15:21:46 +01:00
Matt Westcott 38f0bda70f Change pagination include on page search to match generic listings 2023-07-10 15:21:46 +01:00
Matt Westcott 71b9fb13b9 Convert search view to a django ListView 2023-07-10 15:21:46 +01:00
Matt Westcott 9abd773cd3 Use PermissionCheckedMixin in place of user_passes_test 2023-07-10 15:21:46 +01:00
Matt Westcott d554cbe310 Use a distinct URL endpoint for AJAX search results 2023-07-10 15:21:46 +01:00
Matt Westcott 6040ab32b7 Convert page search to a class-based view 2023-07-10 15:21:46 +01:00
Sébastien Corbin 853aad4305
Fix incorrect override of PagePermissionHelper.user_can_unpublish_obj() in ModelAdmin 2023-07-07 16:35:46 +01:00
Alex Morega ccc44035d9
Refactor test setup for #10638 2023-07-07 16:19:47 +01:00
LB Johnston 04d1e8162b Migrate header search to a Stimulus controller (w-swap)
- Removes the jQuery slide animation so content will be instantly replaced
- Removes the autofocus behaviour on the search fields as this is not helpful for screen readers / keyboard control
- Includes support for `window.header` if provided alongside dynamic adding of data-* attributes if not included
- Base implementation for #9950
- Co-authored-by: sag᠎e <laymonage@gmail.com>
2023-07-06 20:10:31 +10:00
Yuekui 1ea8a0e360 Increase Pillow dependency range to include 10.x
- Drop support for Pillow versions below `9.1.0`
- Fixes #10631
2023-07-06 17:09:28 +10:00
LB Johnston 91a3c6d2c2 Add changelog for #10632 2023-07-06 16:53:46 +10:00
Yuekui a9ced69b2a Move django-filter version upper bound to 24 2023-07-06 16:52:11 +10:00
Thibaud Colas f4ea0156a2 Implement new Draftail customisation APIs
- Fixes #5580
- Remove TSLA/TWTR/BTC references and replace with clean energy FSLR / NEE stocks
2023-07-06 13:14:54 +10:00
LB Johnston 4f012d75ec Add changelog & contributors for #10638
- Original work done via #10413
2023-07-06 12:39:41 +10:00
Alex Morega 60ed6d25c9 Add test for fix against #10411 2023-07-06 12:39:41 +10:00
Henry Harutyunyan 3da4b686eb Fix removing Metadata in API
Fixes #10411
2023-07-06 12:39:41 +10:00
LB Johnston 8251072e6d Replace usage of innerHTML with textContent
- Stimulus CountController content is programatically generated but best to avoid writing HTML accidentally
- ChooserModel field required label should avoid risk of translations with HTML
- Image focal point chooser's label does not need to support HTML
- FieldBlock us using h util but this can be avoided by built in browser escaping when innerText is used
- focal-point-chooser gets value from its set up but we should avoid innerHTML if we can
2023-07-06 12:26:43 +10:00
LB Johnston 1e271afc92 Chore - remove unused global declaration
- Was triggering an Eslint warning
2023-07-05 08:13:38 +10:00
SebCorbin d52484f524 Auto-select single block in StreamField
- Closes #3998
2023-07-04 17:38:45 +10:00
Damilola Oladele c37847a6fb
Switch the tutorial snippets example to be more understandable #10609 (#10624)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>

Also includes:

- Further tone updates based on Vale
- Address other feedback to earlier parts of the tutorial
2023-07-03 16:54:49 +01:00
Th0masCat c7039ed9d3 Link Chooser - tel: links should prevent spaces
- Added regex operation to strip out spaces
- See spec - tel: hrefs should not have spaces https://www.rfc-editor.org/rfc/rfc3966#section-3
- Fixes #10558
2023-07-03 20:28:44 +10:00
LB Johnston 6491ae49ce Docs - Align on client-side & fix Draftail typos
- Prep for #10197
- Fix a few cases where Draftail was spelt incorrectly
- Align with `client-side` not `clientside` as this is used most commonly
- fix javascript code snippet
2023-07-03 19:18:44 +10:00