Wykres commitów

1405 Commity (ef0c8f344684614d27d2f4e5cc8ba35794395e07)

Autor SHA1 Wiadomość Data
Matt Westcott ef0c8f3446 Add documentation for reporting security issues 2020-04-20 11:57:26 +10:00
Mitchel Cabuloy d0a0c804c2 Remove inappropriate banner landmarks & adopt main element in admin 404
According to the ARIA spec:

> A region that contains mostly site-oriented content, rather than page-specific content.

> Site-oriented content typically includes things such as the logo or identity of the site sponsor, and a site-specific search tool. A banner usually appears at the top of the page and typically spans the full width.

Where the `banner` role was applied was more page-specific than
site-specific. In addition, tags with `banner` roles should not live
under another landmark. To rectify, removed the misused banner roles.

Remove inappropriate contentinfo landmarks

According to ARIA spec 1.1

> A large perceivable region that contains information about the parent document.

> Examples of information included in this region of the page are copyrights and links to privacy statements.

They don't apply to the action buttons on where this was applied to.

Add main landmark to 404 page
2020-04-19 22:23:21 +10:00
Rich Brennan 2dbd0a49f9 Fix document serve response filename when non-ascii characters used
* url encode the document filename in the Content-Disposition header in the document serve view
2020-04-19 21:56:49 +10:00
LB Johnston ce815a5f00 page.copy to use `exclude_fields_in_copy` child & parental m2m relations
- fixes #5099
- test_copy_page_with_excluded_parental_and_child_relations
- ensure the tests are wrapped in a try/finally so that the model is always reset back even if tests fail
- update page model tests
2020-04-19 15:13:08 +10:00
Nick Smith 555adccc2a Set TreeQueryset.delete.queryset_only = True (#5938)
Fixes wagtail/wagtail#5937

This reverts Wagtail's behaviour to match Django's, where an error is
raised as a safety mechanism.

Projects relying on the non-safe behaviour should update e.g.
`MyModel.objects.delete()` to `MyModel.objects.all().delete()`.
2020-04-17 21:44:01 +01:00
Matt Westcott deb1213148 Release notes for 2.8.1 2020-04-14 10:11:23 +01:00
Matt Westcott 1d043914b4 Release notes for 2.7.2 2020-04-14 10:11:23 +01:00
Karl Hobley 9d4009bebb Changelog/release notes 2020-04-08 11:12:57 +01:00
Tom Dyson f37da8f7d8 Cache image renditions (#4883) 2020-04-07 14:05:27 +01:00
Andy Babic 9fa2ba939d Release notes for #5932 2020-04-03 22:01:08 +01:00
Andy Babic e9371f45c7 Release notes for #5931 2020-04-03 21:28:13 +01:00
Andy Chosak 3797132b4d Allow ListBlocks to leverage child bulk_to_python
Currently a select set of StreamField blocks like PageChooserBlock
expose a bulk_to_python method that is used to optimize their
retrieval from the database. As reported in issue 5926, ListBlock could
take advantage of this so that its child items are loaded at once,
instead of one at a time.

This change modifies how ListBlock.to_python works so that it calls its
child block's bulk_to_python, if defined. This allows for a single query
instead of one query per child item.

Note that this change doesn't add bulk_to_python to ListBlock itself,
meaning that individual ListBlocks in a StreamField or StructBlock are
still retrieved independently. But it does optimize the lookup for each
ListBlock.
2020-04-03 09:31:56 -04:00
Mohamed Feddad bb2e460c0b Replace deprecated ugettext, ungettext with gettext and ngettext. (#5907) 2020-04-02 17:15:26 +01:00
Karran Besen 36e777418f Fix: Hide empty 'view live' links 2020-03-20 14:33:09 -04:00
Matt Westcott 205249b317 Release note for #5884 2020-03-19 17:49:33 +00:00
Paulo 494260f8ee Fixed #5537 -- Fetch deferred stream fields from db (#5661) 2020-03-19 17:20:22 +00:00
Michał (Quadric) Sieradzki 5e2d12b518 Add scope attribute to TableBlock generated tables for visually impaired users (#5865) 2020-03-19 16:50:55 +00:00
Michał (Quadric) Sieradzki 06fbde14b3 fix display issue on snippet edit view (#5883) 2020-03-19 16:44:34 +00:00
Fidel Ramos 0ccfe9568f Fix image resizing failing on slim images
Image operations sometimes calculate a target width or height of zero, which
make Willow raise a ValueError.

If an user uploads one such image it's possible to break the whole Wagtail
image manager/picker/uploader for all users.

The fix is to use a minimum of 1 pixel for either the target height or the
width. The image might lose some aspect ratio, but it's better than an
exception.
2020-03-19 16:39:20 +00:00
Matt Westcott 526649008d Release note for #5870 2020-03-19 16:12:40 +00:00
Matt Westcott f83977c291 Add cache to speed up compiling media declarations for stream blocks
As proposed by @pimarc in https://github.com/wagtail/wagtail/issues/3062#issuecomment-586331423
2020-03-18 16:12:46 +00:00
Matt Westcott a34d509f7e Release note for #5880 2020-03-13 17:42:11 +00:00
Matt Westcott 98c2aefbe8 Revert "Allow url punctuation as defined in RFC 3986 section 2.3"
This reverts commit 08ef3f4840. Reverting as it breaks serving static files with whitenoise.

Conflicts:
	CHANGELOG.txt
	docs/releases/2.9.rst
2020-03-10 15:51:31 +00:00
Matt Westcott 7dae758ea4 Release note for #5845 2020-03-04 11:53:03 +00:00
Storm Heg 08ef3f4840 Allow url punctuation as defined in RFC 3986 section 2.3 2020-03-03 17:38:07 +00:00
stevelyall babcbb7f80 Add Vidyard to oEmbed provider whitelist 2020-03-03 17:06:05 +00:00
Casper 19f50c72ce Hide preview button when preview_modes is empty 2020-03-03 16:20:23 +00:00
Matt Westcott 122575d2ee Release note for #5848 2020-02-26 14:11:17 +00:00
Maylon Pedroso 78cc81c505 Set context variable to None if no image provided to image templatetag 2020-02-25 23:16:52 +00:00
Karl Hobley 7e8f8f893c
Add changelog entry for removing Django 1.11 support 2020-02-24 12:26:48 +00:00
Matt Westcott 8931312025 Release note for #5827 2020-02-21 17:29:07 +00:00
Matt Westcott 4df455ea9f
Remove support for Django 2.1 (#5840) 2020-02-18 13:55:53 +00:00
Matt Westcott a97256a4f7 Release note for #5837 2020-02-18 11:45:53 +00:00
Matt Westcott 51d8433b6b Release note for #5787 2020-02-17 12:30:10 +00:00
Andy Babic 1c2719720d Release notes for #5810 2020-02-16 21:43:36 +00:00
Andy Babic 061f0e2571 Release notes for #5828 2020-02-16 21:18:11 +00:00
jacobtoppm 3ac230f821 Prevent 'status' banners for page locking being doubled up on POST requests (#5818) 2020-02-11 09:25:09 +00:00
Matt Westcott 4314f3d1a1
Implement MultipleChoiceBlock (rebase of #5592) (#5819)
* Implement MultipleChoiceBlock (squashed commits from #5592)

* Omit widget from frozen kwargs

* Rename get_callable_choices to indicate it is an internal method

* Add release notes for MultipleChoiceBlock
2020-02-10 22:24:49 +00:00
Arkadiusz Ryś 47f677577e Make server-side slug generation respect WAGTAIL_ALLOW_UNICODE_SLUGS (#5808) 2020-02-05 17:33:32 +00:00
Matt Westcott afd707f6b4 Fill in release date for 2.8 2020-02-03 13:34:04 +00:00
Andy Chosak 81d23fc8ab Support the rel attribute on ModelAdmin buttons
Currently it is possible to pass the target attribute to a button
created using ModelAdmin's ButtonHelper framework. This allows you to
generate button links like <a ... target="_blank">.

For example, if adding a new button and modeling it after the existing
edit_button code [0], you can add {'target': "_blank"} to the returned
dict and it'll get passed to the template when the button is rendered.

To be consistent with PR 4844, and to be consistent with what seems to
be the best practice ([1], [2]), we should also support passing the rel
attribute, which would allow for creation of button links like <a ...
target="_blank" rel="noopener noreferrer">.

[0] 5e2f50403b/wagtail/contrib/modeladmin/helpers/button.py (L61-L73)
[1] https://developers.google.com/web/tools/lighthouse/audits/noopener
[2] https://www.jitbit.com/alexblog/256-targetblank---the-most-underestimated-vulnerability-ever/
2020-01-26 21:06:26 -05:00
Jack Paine 70da204eb1 Reduce contrast of rich text toolbar. Fix #4997 (#5740) 2020-01-25 00:05:27 +00:00
Thibaud Colas 2933589680 Add release notes for #5467 2020-01-24 20:56:18 +00:00
Thibaud Colas eb0612c21c Add release notes for #5784 2020-01-24 15:56:34 +00:00
Thibaud Colas b7872e3f2f Add release notes for #5773 2020-01-23 16:21:43 +00:00
Thibaud Colas ef6ace6e98 Add release notes for #5775 2020-01-23 15:59:43 +00:00
Matt Westcott 11ba755f63 Release note for #5777 2020-01-23 15:33:19 +00:00
Matt Westcott 8ad9f8ecf7 Add changelog / release notes for 2.9 2020-01-23 11:56:35 +00:00
LB Johnston d202195333 fix minor typos in changelog/2.8 release notes 2020-01-22 07:27:34 +10:00
Matt Westcott 25942a4467 Rename WAGTAIL_ENABLE_RESPONSIVE_EMBED to WAGTAILEMBEDS_RESPONSIVE_HTML for consistency with other settings 2020-01-20 18:57:51 +00:00