Lovelyfin00
a81242ca86
Migrate initAutoPopulate to Stimulus
...
- Removed initAutoPopultae function from editor.js
- Added the compare and urlify methos to SlugController
- Wrote tests for SyncController, added more test cases to slugController
- Closes #10088
2023-03-27 21:55:56 +10:00
LB Johnston
d6d8b99f3e
BaseSequenceBlock - remove extra space in HTML
2023-03-25 22:13:47 +10:00
Matt Westcott
569bdd3cb9
Disconnect signal handlers that are connected during tests
...
Saves over 30 seconds on a full test run, in my not-so-scientific trial.
2023-03-24 17:13:13 +00:00
Thibaud Colas
ca83e5a34f
Re-label "StreamField blocks" option in block picker to "Blocks"
2023-03-24 15:46:51 +00:00
Thibaud Colas
9288f3940c
Fix server-side caching of the icons sprite
2023-03-24 15:31:58 +00:00
Sage Abdullah
8285936d99
Add missing changelog for #10223 and #10255 in 4.1.4 and 4.2.2
2023-03-24 15:31:43 +00:00
Sage Abdullah
22c5de6dd0
Handle multi-valued query parameters in ModelAdmin IndexView
...
Ref: https://github.com/django/django/pull/16621
Without this change, the filters break in Django 5.0 because the ListFilter class expects the value to be a list
2023-03-23 18:40:20 +00:00
Matt Westcott
15821675e8
Release note for #10241
2023-03-23 14:17:44 +00:00
Sage Abdullah
094bb83848
Allow customising the number of snippets per page on the chooser view
2023-03-23 14:15:47 +00:00
Sage Abdullah
f533ab219d
Allow customising the number of snippets per page on the listing view
2023-03-23 14:15:42 +00:00
Matt Westcott
8d2b1c68cb
Release note for #10235
2023-03-23 13:55: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
9f070f6262
Make sure hooks are loaded when looking for snippet models
...
Snippets can be registered in wagtail_hooks.py by calling register_snippet as a function instead of a decorator. If there is code that looks for snippet models and is executed before hooks are loaded, it may lead to incorrect results.
For example, the create_extra_permissions function is connected to the post_migrate signal, which gets called very early when testing. Without this change, running wagtail.snippets.tests.test_locking separately will result to a failing test because the permissions for FullFeaturedSnippet (that is registered in wagtail_hooks) have not been set up, as the testapp's hooks have not been called by the time the post_migrate signal is sent.
2023-03-23 13:54:54 +00:00
Sage Abdullah
e6d920d435
Add docs and tests for snippets admin URL customisation
2023-03-23 13:54:49 +00:00
Sage Abdullah
dc44e571c8
Allow admin URL customisation for snippets via SnippetViewSet
2023-03-23 13:54:43 +00:00
Sage Abdullah
9f33ef3137
Add missing extra CSS and JS defined by filters in snippets listing view
...
- Fixes #10254
2023-03-23 09:06:33 +10:00
Matt Westcott
5f154a5a51
Release note for #10178
2023-03-22 15:30:42 +00:00
Daniel Kirkham
198388bf55
Add docs and tests for customising snippet icons
2023-03-22 15:15:30 +00:00
Sage Abdullah
c2d4f89692
Use SnippetViewSet.icon in SnippetBulkAction
2023-03-22 15:05:18 +00:00
Sage Abdullah
dd54899ec8
Pass icon to AdminSnippetChooser in SnippetViewSet.register_chooser_widget()
...
This effectively sets the chooser widget icon to use SnippetViewSet.icon
2023-03-22 15:05:12 +00:00
Sage Abdullah
def6723a21
Allow BaseChooser widget to accept an icon kwarg
2023-03-22 15:05:06 +00:00
Daniel Kirkham
fd1ccbc669
Allow a custom icon in SnippetViewSet to be used across the admin views
2023-03-22 15:03:48 +00:00
Matt Westcott
7a7bbfa6cf
Release note for #10072
2023-03-21 14:31:05 +00:00
Sage Abdullah
568aa64204
Hide delete confirmation message for protected images
2023-03-21 12:10:38 +00:00
Sage Abdullah
f1d982f23e
Add tests for deleting a protected image and document
2023-03-21 12:03:40 +00:00
Sage Abdullah
26833c24d7
Add tests for ReferenceIndex's on_delete description
2023-03-21 12:03:39 +00:00
Sage Abdullah
2e79a05417
Prevent POST requests from deleting objects with a protected reference in generic DeleteView
2023-03-21 12:03:39 +00:00
Sage Abdullah
57bf2d28c2
Move snippets usage tests to a separate test_usage module
2023-03-21 12:03:39 +00:00
Sage Abdullah
007990347d
Use generic DeleteView for documents DeleteView
2023-03-21 12:03:39 +00:00
Sage Abdullah
e3d2e93fb2
Extend generic DeleteView for image DeleteView
2023-03-21 12:03:39 +00:00
Sage Abdullah
9a0aebba9c
Call get_object() during setup() in DeleteView
...
This allows us to make use of self.object in dispatch() for permission checks
2023-03-21 12:03:39 +00:00
Sage Abdullah
ccf53cee83
Add next URL support to generic DeleteView
2023-03-21 12:03:39 +00:00
Sage Abdullah
daf265873e
Make use of pk_url_kwarg in generic DeleteView.get_object()
2023-03-21 12:03:38 +00:00
Sage Abdullah
5939fa8955
Change 'used' -> 'referenced'
2023-03-21 12:03:38 +00:00
Sage Abdullah
c298609cbc
Show usage summary on page and snippet unpublish views
2023-03-21 12:03:38 +00:00
Sage Abdullah
b075205ea8
Extract usage summary link into a shared include template
2023-03-21 12:03:38 +00:00
Sage Abdullah
fccf6f9070
Show usage summary on page delete view and prevent protected deletion
2023-03-21 12:03:38 +00:00
Sage Abdullah
85919455b5
Move generic confirmation templates from shared to generic
2023-03-21 12:03:37 +00:00
Sage Abdullah
55876d99bd
Use generic confirm_delete template in snippets DeleteView
2023-03-21 12:03:37 +00:00
Sage Abdullah
995263ffce
Add default confirmation message to generic DeleteView
2023-03-21 12:03:37 +00:00
Sage Abdullah
991c2be3ed
Show usage count with link to usage view on generic DeleteView delete confirmation
2023-03-21 12:03:37 +00:00
Sage Abdullah
8bb055652c
Add support for showing on delete information on generic usage view
2023-03-21 12:03:37 +00:00
Sage Abdullah
6165f8a004
Show content type on usage view table
2023-03-21 12:03:37 +00:00
Sage Abdullah
78b94f567c
Add on_delete information helpers to reference index
2023-03-21 12:03:36 +00:00
Sage Abdullah
a857332299
Show more descriptive info for references in StreamFields
...
Show the block path and label to better understand which block has the reference
2023-03-21 12:03:36 +00:00
Sage Abdullah
6398443ad7
Reduce queries when accessing reference index records
...
Make use of cached properties and ContentType's manager cache
2023-03-21 12:03:36 +00:00
Andy Babic
f680f188f3
Add useful properties to Locale
...
- Update get_display_name() to always return a string
- Add documentation and unit tests
2023-03-21 08:02:40 +10:00
LB Johnston
65f2eaa4d2
Documentation - Clean up minor formatting issues
2023-03-21 08:02:25 +10:00
zerolab
d51ec00ce1
Fix TableBlock initialisation
...
- move Handsontable render after load & resize width after load
- stops firing a resize event
- adjusts targets to account for the changed markup
- fixes #9107
2023-03-21 07:02:00 +10:00
Stefan Hammer
0016ee7dfd
Fix timezone handling of TemplateResponse
s for users with a custom timezone
...
The PR #9628 missed the cases, where a TemplateResponse is used, which
defers the rendering to a point outside the override_tz() context
manager. This change re-uses the existing handling for the user's
preferred language.
Fixes #10243
2023-03-20 11:43:10 +00:00