0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-21 18:09:02 +01:00
Commit Graph

6119 Commits

Author SHA1 Message Date
LB
57f7abda43 Add a changelog entry for #12569
Fixes #12563
2024-11-20 16:31:49 +10:00
Andy Babic
66f1e817eb
Allow page types to easily restrict what type of requests they respond to (#12473)
* Allow page types to specify the request methods they support and block unsupported requests in serve()
* Use 'before_serve_page' hook to serve OPTIONS responses
* Add checks to RoutablePageMixin.serve() where the parent implementation is bypassed
* Rename check_http_method to check_request_method and actually use the return value
* Support Python 3.9 through to current approaches for `http` method strings
* Include documentation, docstrings & changelog entry
2024-11-20 10:15:36 +10:00
LB
3697ee1f2a Eslint - fix location of storybook folder & remove eslint ignore 2024-11-20 07:52:43 +10:00
LB
acd2c535f6 Remove canvas-to-blob polyfill
Historic recommendation for jQuery image upload before all browsers supported `canvas.toBlob`.

All modern browsers supported by Wagtail have had support for this for many years now.

- See https://caniuse.com/?search=toblob
- See https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob
2024-11-20 07:46:40 +10:00
Matt Westcott
3697501426 Fill in release date for 6.3.1 2024-11-19 15:56:45 +00:00
Sage Abdullah
ae1dab03ab Lower docs search ranking for release notes (#12586)
Except for the 'upgrading' section, as it's still generally useful
2024-11-19 15:24:22 +00:00
Matt Westcott
f833a2f520 Remove forced capitalization of site name on admin dashboard (#12601)
Fixes #12592
2024-11-19 15:14:04 +00:00
helloshiv
f0d3edfad6
Fix wagtailcache and wagtailpagecache examples to not use quotes for the fragment_name 2024-11-19 14:18:17 +00:00
Sage Abdullah
f741f9f333
Release note for #12576 in 6.3.1 2024-11-19 14:16:50 +00:00
Sage Abdullah
b1251d8279
Release note for #12573, #12587, #12590, #12591 in 6.3.1 2024-11-19 14:13:29 +00:00
Sage Abdullah
a5761bc2a9 Improve spacing of page permissions table in Group settings (#12585) 2024-11-18 16:45:54 +00:00
Matt Westcott
d2b9bd224d Release note for #12571 in 6.3.1 2024-11-18 15:51:08 +00:00
Clifford Gama
f4d3c80e2f Fix typo: remove reference to PublishingPanel as a method 2024-11-18 12:49:15 +00:00
Clifford Gama
ed084ae3bd Fix misleading wording - clarify that get_site_root is created, not used 2024-11-18 12:48:39 +00:00
Clifford Gama
791f031e16 Fix minor typo - capitalize Page model 2024-11-18 12:40:12 +00:00
Thibaud Colas
cd8c19d762 Rename tutorial blog index page to reduce the likelihood of slug issues (#12576) 2024-11-15 16:24:52 +00:00
Clifford Gama
9509d6409f Clarify get_context() usage in BlogTagIndexPage example (#12573) 2024-11-15 16:21:10 +00:00
Matt Westcott
e7dd00e427 Ensure that creation of image/document choose permissions happens after access_admin permission exists
As per https://github.com/wagtail/wagtail/issues/12581#issuecomment-2478983521.
Fixes #12581
2024-11-15 16:18:20 +00:00
Sage Abdullah
5eca192bd2
Release note for #12564 2024-11-13 16:30:50 +00:00
Matt Westcott
5212061485
Normalize StreamField.get_default to prevent creation forms from breaking
Fixes #12561

When a ModelForm is constructed without passing an `initial` instance, the result of `StreamField.get_default()` will become the default value of the form field without the intermediate step of being set on a model instance and read back (which would have the side effect of calling `normalize()`). Form rendering only works with normalized values (e.g. StreamValue rather than list-of-tuples for a StreamBlock), so the return value from `get_default()` needs to be normalized.
2024-11-13 15:46:07 +00:00
Sage Abdullah
210f35f7ec
Release note for #12556 2024-11-13 14:20:10 +00:00
Matt Westcott
aa31d329ab
Stop invalid Site hostname records from breaking preview
As made famous by https://youtu.be/v3KEaMTfKg0?t=319 :-)

By design, Wagtail tolerates the default Site record being left at its default value of 'localhost' up to a certain point. Ideally, that point should be when it becomes strictly necessary for Wagtail to care about hostnames (such as when setting up the second site of a multi-site installation) and it should be clear to the developer what has happened and how to fix it.

In practice, that point often comes when the developer deploys their site to production, sets `DEBUG=False`, and is then required by Django to set `ALLOWED_HOSTS` to their real domain name. At this point, front-end page requests work (because the initial site record is default=True, matching any domain including the live one) but previews are broken (because the dummy request object is still formed using localhost as per the site's hostname field, which is disallowed by ALLOWED_HOSTS).

This is unnecessary, and can be avoided by validating the hostname against ALLOWED_HOSTS and substituting one that _is_ allowed if necessary, as we already do for pages that don't have an associated site record.
2024-11-13 13:57:14 +00:00
Sage Abdullah
6315d3c1cc
Release note for #12551 2024-11-12 10:59:57 +00:00
Sage Abdullah
92714d87e7
Minor tweaks per code review 2024-11-12 10:58:04 +00:00
Sage Abdullah
533481b0f4
Add note about extending section not subject to deprecation policy 2024-11-08 20:09:39 +00:00
Sage Abdullah
991d9bcab5
Update release process documentation 2024-11-08 20:09:39 +00:00
Sage Abdullah
f43cf941d5
Improve upgrade guide to reflect current versioning scheme and highlight important steps 2024-11-08 20:09:39 +00:00
Sage Abdullah
246f3c7eb5 Fix profile picture upload not working in account settings (#12548)
Fixes #12547
2024-11-07 13:03:20 +00:00
Matt Westcott
122b9683fa Add 6.3.1 release notes 2024-11-07 13:03:13 +00:00
Matt Westcott
e7e57cd29e Release note for #12488 2024-11-05 22:36:43 +00:00
ayaan-qadri
b0c90d4be2 Removed preventDefault from openPreviewInNewTab in PreviewController
Relates to #10356
2024-11-06 07:47:10 +10:00
LB
825a77d6c2 Remove all eslint-disable no-undef & use global comments (#12527)
Recommendation is to either declare globals in config or in a `/* global ` comment
See https://eslint.org/docs/latest/rules/no-undef#rule-details
2024-11-05 20:11:09 +00:00
LB
cae3229716 Remove unnecessary DOM Range polyfill (#12496)
- Remove DOM Range polyfill provided by https://developer.mozilla.org/en-US/docs/Web/API/Range
- All Wagtail supported browsers, as of a few years ago, have built in support for `document.createRange`, see https://developer.mozilla.org/en-US/docs/Web/API/Range
2024-11-05 20:01:31 +00:00
Matt Westcott
3013673c55 Release notes for #12480 2024-11-05 19:48:24 +00:00
John-Scott Atlakson
9d31fd3fa5 Fix - Ensure WagtailAdminFormPageForm.clean returns cleaned_data
Return `cleaned_data` for more consistent subclassing.

Updated documentation with an example of adding custom page validation for form fields.

Add unit test to ensure that the documented usage of extending `WagtailAdminFormPageForm` works as expected.

Originally from #10375
2024-11-05 19:22:33 +00:00
minusf
f600a356e6
Add missing apostrophe in settings documentation (#12542) 2024-11-05 16:09:55 +00:00
Sage Abdullah
f21f6dd884
Release note for #12525 2024-11-05 12:56:59 +00:00
Sage Abdullah
794fa3bcaf
Improve documentation guidelines on writing docstrings and API reference 2024-11-05 12:52:57 +00:00
Sage Abdullah
a81cc7345d
Remove e.g. in documentation guidelines 2024-11-05 12:45:26 +00:00
Sage Abdullah
17ce66ad45
Update outdated Pillow links 2024-11-05 10:44:41 +00:00
Sage Abdullah
f54b03d595
Use intersphinx to link to treebeard docs 2024-11-05 10:44:41 +00:00
Sage Abdullah
da3e0ade37
Use intersphinx to link to MyST-Parser docs 2024-11-05 10:44:41 +00:00
Sage Abdullah
ddf8423f3c
Use stable link to Wand docs
There's only one link to Wand's docs, not worth adding an
intersphinx_mapping entry.
2024-11-05 10:44:40 +00:00
Sage Abdullah
b7cf847d69
Replace outdated Wagtail editor manual link with link to the editor guide 2024-11-05 10:44:40 +00:00
Sage Abdullah
503d1a743a
Replace hardcoded Python docs links with intersphinx 2024-11-05 10:44:40 +00:00
Sage Abdullah
5615deb5b1
Add Django's custom Sphinx roles and use them to link to settings
This is necessary for rST docs, i.e. in docstrings and in eval-rst
blocks. Without this, Sphinx cannot seem to understand the role. See:
https://stackoverflow.com/questions/13387125

MyST-Parser seems to be smarter, it can figure out these custom
roles without having to register the types ourselves. This is evident in
the previous commits where I already use the :setting: role in markdown
docs.
2024-11-05 10:44:40 +00:00
Sage Abdullah
9a5be8f180
Replace more hardcoded Django links with intersphinx in rST docs
Some link labels are changed to just the code part, because using Sphinx
roles for code objects (e.g. methods, attributes) would always format the
text as inline code.

It's currently impossible to customize the formatting of a link's text in
rST. See https://stackoverflow.com/questions/4743845
2024-11-05 10:44:39 +00:00
Sage Abdullah
857b26e5a0
Replace hardcoded Django docs links to intersphinx links 2024-11-05 10:44:39 +00:00
Sage Abdullah
9d69863f3c
Use intersphinx to link to Sphinx docs 2024-11-05 10:44:39 +00:00
Sage Abdullah
795ca50dc8
Improve clarity between Markdown/MyST, rST, and Sphinx in docs guidelines
Add more emphasis on the divide between when to use Markdown and when to
use rST.

Also improve examples for versionadded and versionchanged directives.
2024-11-05 10:44:39 +00:00