Wykres commitów

18638 Commity (46c7c60b496e23b65fd7bb07c325ef407578556b)

Autor SHA1 Wiadomość Data
LB 46c7c60b49 Add changelog & release considerations #12882 2025-04-03 12:19:54 +10:00
the-r3aper7 9f04de83d5 Remove shared admin imports from `_editor_js.html` & remove unnecessary usage
- Fixes #2936
- Deprecate the usage of _editor_js.html
2025-04-03 12:19:54 +10:00
Srishti-j18 97975b5293 Increase the gap of columns within row fields for comment button #12806 2025-04-02 08:35:40 +10:00
Srishti-j18 cc345cff54 Fix comment button positioning next to fields #12807
- Fixes #12687
- Fields fixed; radio checkbox, radio, multi checkbox, select
2025-04-02 06:36:22 +10:00
Matt Westcott edf7c66fac Mention third-party StreamField form builder packages in form builder docs
As per https://github.com/wagtail/wagtail/pull/12287#issuecomment-2769692508
2025-04-02 06:17:47 +10:00
Matt Westcott db3a695695
Ensure ImproperlyConfigured is thrown from db_field on unbound FieldPanels as intended
Since the refactor of the base panel class in b599fce714, self.model is always defined (initially as None) so the ImproperlyConfigured exception would never be thrown.
2025-03-27 13:57:02 +07:00
Matt Westcott 125a749a9a Defer validation of min_num constraints on InlinePanel when saving drafts 2025-03-25 09:17:37 +00:00
Matt Westcott d0f28a1a69 Defer validation of required fields in InlinePanel when saving drafts 2025-03-25 09:17:37 +00:00
Matt Westcott 39e4db4e39 Release note for #12976 2025-03-24 20:25:44 +00:00
Sage Abdullah 5c97298e15 Use underscore-separated keys in setup.cfg for setuptools >= v78 2025-03-24 20:08:30 +00:00
Sage Abdullah 45f89a335d Use WagtailAdminModelForm as the base for RedirectForm and SearchPromotionForm 2025-03-24 20:08:30 +00:00
Sage Abdullah 2fbf6b5f06 Remove FORMS_URLFIELD_ASSUME_HTTPS stop-gap in CI tests 2025-03-24 20:08:30 +00:00
Sage Abdullah 7b5d772b21 Avoid deprecation warnings about URLField assume_scheme on Django 5.x 2025-03-24 20:08:30 +00:00
Sébastien Corbin 6a7917697c
Fix typo in preview blocks documentation 2025-03-24 10:01:52 +01:00
Sage Abdullah d3341e8fa7 Make title and slug optional in page previews 2025-03-21 17:47:27 +00:00
Sage Abdullah 9eac93a565 Defer validation of required text fields in previews 2025-03-21 17:47:27 +00:00
Sage Abdullah 6b40a38346 Ignore AVIF deprecation in pillow-heif
A stop-gap until https://github.com/wagtail/Willow/issues/166 is resolved
2025-03-21 16:47:17 +00:00
Jake Howard 8faa15175c
Make GitHub highlight html files as Django templates
Shamelessly stolen from https://github.com/django/django/pull/19279
2025-03-21 23:20:06 +07:00
Matt Westcott 103ea61702
Document that request_or_site is optional on BaseGenericSetting.load 2025-03-20 19:11:19 +07:00
Matt Westcott 68a3bd4725 Ignore minimum block_counts constraints when deferring validation 2025-03-19 18:27:09 +00:00
Matt Westcott 6938786444 Ignore min_num constraints when deferring validation 2025-03-19 18:27:09 +00:00
Matt Westcott 6d01356ec6 Rework deferring validation on StreamField
Overwriting a block's `required` option is not safe, as a block object is part of a class-level definition and is thus shared by all block instances, not just the one currently being validated. Instead, introduce a flag to Block.clean to skip 'required' validation.
2025-03-19 18:27:09 +00:00
Matt Westcott c38db51559 Add versionchanged note for new Page.save validation 2025-03-19 14:22:45 +00:00
Matt Westcott 04a174f0f2 Make get_latest_str fallback translatable 2025-03-19 14:22:45 +00:00
Matt Westcott 6a0bd93e5b Add an empty_value_display property on Column for use when value is blank
This surfaces an issue with SearchPromotion having a broken string representation when the query string is None, so fix that too
2025-03-19 14:22:45 +00:00
Matt Westcott 397edf2ec5 Support deferring validation on StreamField 2025-03-19 14:22:45 +00:00
Matt Westcott 5015eddef3 Preserve required asterisks on validation-deferred fields when re-showing form after an error 2025-03-19 14:22:45 +00:00
Matt Westcott 2ab55ac3c8 Use fallback for blank string representations on model index and edit views 2025-03-19 14:22:45 +00:00
Matt Westcott 3f70a0a52f Add fallback for blank string representations in audit log, and add tests for creating/editing invalid draft snippets 2025-03-19 14:22:45 +00:00
Matt Westcott f649856cf4 Defer validation when saving snippets as draft 2025-03-19 14:22:45 +00:00
Matt Westcott 0745ae53da Test that validation is still enforced on save_revision when saving or scheduling
As per https://github.com/wagtail/rfcs/pull/104#issuecomment-2691145020 - unless clean=False is explicitly passed, validation should be applied, including on fields that would accept nulls at the database level.
2025-03-19 14:22:45 +00:00
Matt Westcott 2b882743ec Enforce validation on save for FieldPanels corresponding to non-null, non-text-type model fields 2025-03-19 14:22:45 +00:00
Matt Westcott 96f9ebe3f6 Recognise required_on_save flag being set on model fields
It is clear from the test models and bakerydemo that title is frequently declared with a plain FieldPanel rather than TitleFieldPanel, so we should not rely on the presence of TitleFieldPanel or an explicit required_on_save flag on the FieldPanel to enforce form-level validation on the title.
2025-03-19 14:22:45 +00:00
Matt Westcott abb7a687e4 Add tests for creating / publishing EventPage with a blank (required) from_date field
The fix to EventPageForm.clean addresses a logic bug that existed before the change to validation - if `date_from` was left blank, it would be omitted from `cleaned_data` and so retrieving it would raise an uncaught KeyError.
2025-03-19 14:22:45 +00:00
Matt Westcott a20c55a9bc Add tests for validate-on-publish when editing 2025-03-19 14:22:45 +00:00
Matt Westcott 51629e8488 Add tests for validate-on-publish when creating pages 2025-03-19 14:22:45 +00:00
Matt Westcott a56888a7ab Defer validation on FieldPanel unless required_on_save passed 2025-03-19 14:22:45 +00:00
Matt Westcott d0e106b403 Fix test models to use TitleFieldPanel for the title field 2025-03-19 14:22:45 +00:00
Matt Westcott 1f210831dd Relax model validation when saving pages as draft 2025-03-19 14:22:45 +00:00
Matt Westcott 13dbf61323 Set default slug / draft_title / locale independently of full_clean method 2025-03-19 14:22:45 +00:00
Matt Westcott a80f40999e Refactor page create/edit views to decouple identifying the action from performing it 2025-03-19 14:22:45 +00:00
Matt Westcott 8cdbbcfe29 Add mechanism for deferring required field validation on WagtailAdminModelForm 2025-03-19 14:22:45 +00:00
LB 8f640a8cdb Add changelog for #12448 2025-03-15 15:51:57 +10:00
Andy Babic a983dc220b
Frontend cache: Fix n+1 query issues when batch purging page urls (#12448)
* Update tests to highlight the current issues
* Optimise PurgeBatch and util methods, and add docstrings
* Use page objects as the site_cache_target in tests
* Use 'cache_object' instead of 'site_cache_target' to better match terminology in Page methods
* Ensure self.captureOnCommitCallback() is applied when performing purges in tests
* Ensure tests check PURGED_URLS outside of captureOnCommitCallback()
2025-03-15 15:48:58 +10:00
LB de99b8b90f Docs - Minor whitespace cleanup 2025-03-15 15:25:30 +10:00
LB 57fcb353d8 Add changelog for #12278 2025-03-15 15:23:54 +10:00
smark-1 322d7e1620 Add documentation for setting the default privacy option on pages 2025-03-15 15:23:54 +10:00
smark-1 6bbd109072 Support showing the default (or parent) privacy setting on page edit/create
Fixes #3708
2025-03-15 15:23:54 +10:00
smark-1 8654aadb63 Add method to set a default privacy option on Page models
Fixes #3708
2025-03-15 15:23:54 +10:00
LB f0c7e88d0e Add changelog for CI test fixes #12960 & #12961 2025-03-15 11:20:41 +10:00