Wykres commitów

1921 Commity (e3b6e79a8e59468ffb9a4a84fba87fa7edaa76ef)

Autor SHA1 Wiadomość Data
Andy Babic c5f49274c8 Release notes for #6847 2021-03-03 13:15:10 +00:00
Andy Babic cd0fd04a67 Release notes for #6846 2021-03-03 13:03:46 +00:00
Andy Babic 54f190d4bb Release notes for #6845 2021-03-03 07:30:50 +00:00
Andy Babic 86824bb5c4 Release notes for #6849 2021-03-02 20:43:12 +00:00
Andy Babic cae9bbbea2 Release notes for #6850 2021-03-02 20:00:28 +00:00
Karl Hobley c002a04576 Changelog / release notes for #6819 and #6320 2021-02-26 09:33:44 +00:00
Karl Hobley 99542475de Changelog/release note for #6639 2021-02-25 10:12:54 +00:00
Matt Westcott 3a057f2fd8 Release note for #6822 in 2.12.2 2021-02-18 09:21:38 +00:00
Matt Westcott 6d1a61ba7e Release note for #6822 in 2.11.5 2021-02-18 09:20:51 +00:00
Matt Westcott 391f578c8e Fill in release date for 2.12.1 2021-02-16 16:08:05 +00:00
Matt Westcott bc1458f9e3 Remove duplicates before applying unique constraint on embed hash 2021-02-16 15:49:54 +00:00
Matt Westcott 0a3d044c9f Fill in release date for 2.11.4 2021-02-16 12:37:17 +00:00
Matt Westcott 14ba9efa18 Release note for #6757 in 2.12.1 2021-02-16 12:30:57 +00:00
Matt Westcott d6ddb997c6 Release note for #6757 in 2.11.4 2021-02-16 12:30:51 +00:00
Matt Westcott 0a8ab74d70 Make the dummy Admin model a managed model
Fixes #6810. As per https://code.djangoproject.com/ticket/13816 , unmanaged models are included in dumpdata by design and so unmanaged models without a database table are not valid.
2021-02-16 09:57:12 +00:00
Cynthia Kiser afc3349c94 Save empty thumbnail_urls as empty strings 2021-02-15 16:27:51 +00:00
Matt Westcott 41ff62a056 Release note for #6756 in 2.12.1 2021-02-03 11:00:18 +00:00
Matt Westcott 920aba28ba Release notes for #6713 and #6756 in 2.11.4 2021-02-03 10:59:08 +00:00
Matt Westcott 1a7a5816a5 Fill in release date for 2.12 2021-02-02 16:09:16 +00:00
Matt Westcott cb29fbba65 Release note for #6713 2021-01-29 16:12:55 +00:00
Thibaud Colas fce19a8059 Add release notes for #6730 2021-01-29 10:24:14 +00:00
Matt Westcott df125b1652 Release notes for #6718 2021-01-26 10:55:26 +00:00
Matt Westcott 23096b9f73 Show required asterisks for required descendant blocks of required streamfields (#6715)
Fixes #5983; possibly also has a bearing on #4306. A CSS rule dating from the original StreamField design was hiding the 'required' asterisk on fields within a required StreamField, presumably on the mistaken belief that they duplicate the information given by the top-level asterisk on the streamfield. (In #5983 this was reported as a regression in 2.7 when the react-streamfield CSS was introduced, so it's possible that the old design had something to mitigate this, e.g. an asterisk being inserted elsewhere.)
2021-01-21 14:36:57 +00:00
Matt Westcott c3abf40ea5 Add release notes / changelog section for 2.13 2021-01-19 09:47:31 +00:00
Matt Westcott fe51d1c6ed Changelog entry for #6409 2021-01-18 17:59:43 +00:00
Michael Brown cadb5456c0 Apply scss styling to collection_choice_field (#6683) 2021-01-18 17:06:29 +00:00
Matt Westcott c0c7f1bd5d Release note for #6635 2021-01-18 15:11:46 +00:00
Andy Babic f905e705da Add Page.specific_deferred (#6661) 2021-01-18 13:25:55 +00:00
Will Giddens 2da410b2e0 Add combined index for Postgres search backend. (#6548)
Fixes #6546
2021-01-18 12:19:18 +00:00
David Beitey 3a5b7255ad Change UniqueConstraint for wider database support (#6607)
This fixes #6393 by modifying the constraint to use an IN condition
which supports both Postgres and SQL Server. Previously, the `|` (OR)
condition was only supported by Postgres because SQL Server only
supports AND conditions.

The implementation follows suggestions from @gasman in
https://github.com/wagtail/wagtail/issues/6393#issuecomment-732161057:

* Migration 0050 is modified to not break on SQL Server
* Added migration 0060 to add or replace the constraint

Additionally, this allows for and documents a `DATABASE_DRIVER` env
variable to be set for testing, to allow a different SQL Server driver
(e.g. FreeTDS on Mac/Linux); and adds the specific `host_is_server`
option for FreeTDS (won't affect SQL Server Native Client on CI).
2021-01-18 11:52:52 +00:00
Matt Westcott 758fa2b863 Release note for #6654/#6658 2021-01-15 20:20:00 +00:00
Robert Rollins d18ffb0233 Implemented a 'choose' permission for Images and Documents (#6466)
This PR adds the 'choose' permission discussed in #4488. It limits Image and Document choosers to showing only those Collections (and their contents) for which the current user has the Choose permission.

It grants Choose permissions to the Root Collection to every existing Group that has the "Can access Wagtail admin" perm, via data migration. So there will be no change in behavior unless the user goes in and alters the Choose perms for their site's groups.

This PR has no effect on anything except choosers. The Image and Document index pages are still controlled solely by the 'add' and 'change' permissions, as those are only accessible by users who have those permissions in the first place. This means that it's now possible to configure a Group to allow its members to choose images from existing Collections when editing pages, *without* them being able to edit said images or add new ones.
2021-01-05 12:23:49 +00:00
Matt Westcott 09fb115a2d Catch JSON decode errors in oembed responses (#6648)
Fixes #6646 - for private videos, Youtube's oembed endpoint returns the text "Forbidden", but with a 200 status code, which fails JSON decoding.
2020-12-18 15:59:51 +00:00
Vadim Karpenko 4cfd303db9 Check action menu items (pages and snippets) for None before using (#6566) 2020-12-15 19:17:53 +00:00
Matt Westcott 3768483352 Fill in release date for 2.11.3 2020-12-10 17:59:21 +00:00
Matt Westcott 49136ea4a5 Prevent error on publish check in create_log_entries_from_revisions (#6628)
Fixes #6498
2020-12-10 17:34:57 +00:00
Matt Westcott 971bdc0799 Fix combining locale/translation_of API filters with search (#6627)
Fixes #6626
2020-12-10 16:26:41 +00:00
Matt Westcott f4702646bd Release note for #6572 2020-12-09 16:28:20 +00:00
Dan Braghis 05587e0d84 Allow customising image/document admin forms (#6462) 2020-12-09 12:35:19 +00:00
Andreas Nüßlein 6a7a5756d9 Add string representation to image Format() (#6608)
when checking on the currently registered Formats, e.g. with `get_image_formats()` the output is now easier to read.
2020-12-09 12:16:26 +00:00
Matt Westcott 8d9e864581 Release note for #6485 2020-12-08 18:23:56 +00:00
Matt Westcott 9a953fd93c Additional release notes for #6559 2020-12-08 16:00:47 +00:00
Scott Cranfill bba831d2cf
Update pagination icons to use SVGs (#6573)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2020-12-04 17:03:50 +00:00
Alex Sa 01d3854696
Add collection_id param to document chooser pagination handling. Fix #5913 (#6529)
Make sure document chooser pagination preserves the selected collection when moving between pages

Co-authored-by: Alexander Sajzew <a.sajzew@alexsa.de>
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2020-12-02 12:41:37 +00:00
Karran Besen 65d0cdf55f
Fix breadcrumb margin overlapping burger menu. Fix #6590 (#6597)
Stop menu icon overlapping the breadcrumb on small viewport widths in page editor

Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2020-12-02 12:05:13 +00:00
Matt Westcott 56a92d466e Fill in release date for 2.11.2
Conflicts:
	CHANGELOG.txt
2020-11-17 15:44:24 +00:00
Cynthia Kiser 28cee081b2 Add custom oEmbed finders for Facebook and Instagram (#6550)
Move code from https://www.codista.com/en/blog/wagtail-instagram-new-oembed-api/ into core

Add custom oembed finder for Facebook

Apply suggestions from @originell's code review

Co-authored-by: Luis Nell <luis.nell@codista.com>

FIXUP More places to change the exception name (and a linter fix)

Extend Instagram/Facebook tests to check HTTP request

Add documentation for omitscript parameter
2020-11-17 15:06:24 +00:00
Matt Westcott 9ef3685efc Allow deleting the default locale (#6553)
Fixes #6533
2020-11-17 11:25:52 +00:00
Matt Westcott 414571cc99 Release note for #6544 2020-11-16 17:15:32 +00:00
Jérôme Lebleu f88e6f91ff Fix header icon name in settings' edit view (#6554) 2020-11-16 15:02:19 +00:00
Matt Westcott 236632d815
Handle get_supported_language_variant returning a language variant not in LANGUAGES (#6547)
* Handle get_supported_language_variant returning a language variant not in LANGUAGES

Fixes #6539

* Handle LANGUAGE_CODE that isn't in LANGUAGES

* Release note for #6547
2020-11-16 11:51:32 +00:00
Matt Westcott a888d3383c Gracefully handle missing Locale records on Locale.get_active and .localized (#6549)
Fixes #6540
There are various code paths where Page.localized and similar can be called even when WAGTAIL_I18N_ENABLED is False, and since it's entirely likely that hand-rolled i18n mechanisms and ad-hoc configuration changes (e.g changing LANGUAGE_CODE) will break the Locale model's assumptions about how things are meant to work, we need to provide sensible fallback behaviour for when the current active locale, or the default locale as per LANGUAGE_CODE, does not have a corresponding Locale record:

* Locale.get_active() will fall back on the default LANGUAGE_CODE locale, or raise Locale.DoesNotExist if that one does not exist either;
* TranslatableMixin.localized (along with Page.localized and Page.localized_draft) will handle a missing Locale record by falling back on the default LANGUAGE_CODE locale, or failing that, returning self.
2020-11-16 10:31:01 +00:00
Karl Hobley 792a9d272b Fetch the depth field of page translations on the edit view
This field is used in the `.can_edit()` permission check
2020-11-13 17:14:22 +00:00
Matt Westcott be45cee2aa Fill in release date for 2.11.1 2020-11-06 17:30:55 +00:00
Matt Westcott f378f48e14 Prevent errors on get_url_parts when a non-content-language locale is active (#6521)
Fixes #6510 and #6511

Catch the LookupError from get_supported_content_language_variant so that if the active language is not one that is recognised as a content language, the URL prefix will be left unchanged from the page's reported locale.

Additionally, skip the `translation.override` when WAGTAIL_I18N_ENABLED is false; this accounts for the fact that existing sites may have used alternative / custom i18n implementations involving i18n_patterns, and on these sites we can't rely on the page's locale field to be meaningful. That way, we restore the pre-2.11 behaviour: if the existing i18n code was using some kind of wrapper around the get_url_parts call, then that will work again; and if not, the URL will reflect the current active locale, which is no worse than before.
2020-11-06 17:04:18 +00:00
Matt Westcott 3c984b9871 Avoid circular import between wagtail.admin.auth and custom user models (#6522)
Fixes #6518

If the models.py containing a custom user model directly or indirectly imports wagtail.admin.auth, this causes a circular dependency because wagtail.admin.auth attempts to import django.contrib.auth.views, which in turn depends on the custom user model. Fix this by moving the django.contrib.auth.views import inside reject_request.
2020-11-06 09:35:21 +00:00
Sævar Öfjörð Magnússon a541510417 Additional safeguard to check if a cached site is from an older version of Wagtail (#6515) 2020-11-04 12:22:43 +00:00
Matt Westcott 14f1d8d59a Add release notes section for 2.11.1
Conflicts:
	CHANGELOG.txt
	docs/releases/index.rst
2020-11-04 10:45:15 +00:00
Matt Westcott 39f953eca3 Release note for Python 3.9 support (#6508) 2020-11-03 11:58:01 +00:00
Matt Westcott 330f0dde15 Fill in release date for 2.11 2020-11-02 15:06:22 +00:00
Matt Westcott 94f6b755b2 Version bump to start work on 2.12 2020-10-23 16:55:21 +01:00
Karl Hobley 6234023f39
Changelog / relase note for internationalisation (#6492)
* Changelog / relase note for internationalisation

* Apply suggestions from code review

Co-authored-by: Matt Westcott <matthew@torchbox.com>
2020-10-23 14:26:44 +01:00
LB Johnston f6dce3d6df Update changelog entries for @samgans 2020-10-22 19:46:07 +10:00
Karl Hobley f0ce1f4775 Replace pushPage/popPage with more flexible gotoPage method
- page explorer
2020-10-22 19:45:34 +10:00
Anton Zhyltsou 41eccc72bc Consistently redirect to admin home on permission denied
* Catch PermissionDenied exceptions in require_admin_access decorator
* Fixed permissions errors for the documents views
* Added permissions tests for the images views
* Fixed some tests for limited permissions
* fixes #6352
2020-10-22 00:10:24 +10:00
Coen van der Kamp fd5e6b657f Switch breadcrumb icons to SVG 2020-10-21 23:57:09 +10:00
Matt Westcott accdbd2174 Mark 2.11 as an LTS release 2020-10-21 12:14:04 +01:00
meghanabhange 3a2f2a6ea3 form_classname meta in FieldBlock (#6470) 2020-10-20 19:17:54 +01:00
Sævar Öfjörð Magnússon b7643f869d Fix spacing around the privacy indicator panel. (#6454) 2020-10-20 13:07:03 +01:00
Andy Babic cbf65ba645 Release notes for #6386 2020-10-19 21:37:28 +01:00
Matt Westcott 8e47b27ffc Fixed -> Fix 2020-10-19 21:31:32 +01:00
Jim Jazwiecki 024717fe0f add support for natural keys to group collection permissions for use in fixtures (#6211) 2020-10-19 21:31:10 +01:00
Matt Westcott 27432e6c3f Release note for #5976 2020-10-18 15:31:56 +01:00
Karl Hobley 44d40292e8 Add release note for page aliases (#6468) 2020-10-16 11:01:10 +01:00
Karl Hobley 10137b0162 Changelog / release notes for #6440 and #6441 + some spelling fixes 2020-10-16 10:45:29 +01:00
Karl Hobley 7f7f9b4de1 Make snippets action menu hookable 2020-10-14 14:41:22 +01:00
Matt Westcott 7be5363dac
Avoid retranslating month / weekday names that Django already provides (#6301)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2020-10-09 14:16:40 +01:00
Karl Hobley 77610d1e64 Changelog / Release notes for #6434 and #6442 2020-10-06 16:02:48 +01:00
Matt Westcott dd42d91663 Release note / additional fix for #6339 2020-10-05 14:25:33 +01:00
jacobtoppm c5a7584553 Add changelog and contributor for #6423 2020-10-05 12:36:54 +01:00
Karl Hobley cf38b2457d Put quotes around some inline code 2020-10-03 14:43:03 +01:00
Karl Hobley 39d931d77d Javascript => JavaScript 2020-10-03 14:43:03 +01:00
Karl Hobley 6e5f89adf2 General spelling fixes 2020-10-03 14:43:03 +01:00
Karl Hobley 8251b4a6c7 Changelog / Release note / Contributor for #6420 2020-10-01 18:53:35 +01:00
Cynthia Kiser b817e869bf Open preview in new window (#6395)
Make this preview button match the other Preview/Draft/Live buttons in admin UI
2020-10-01 13:23:32 +01:00
thenewguy a88866c3c6 Force string url before passing to urlparse (#6341) 2020-09-30 08:10:50 +01:00
Karl Hobley 8605717b62 Revert "Force string url before passing to urlparse (#6341)"
This reverts commit 8a4b04209e.
This reverts commit c005e6fd29.
2020-09-29 16:52:29 +01:00
Karl Hobley c005e6fd29 Changelog / release note for #6341 2020-09-29 13:54:02 +01:00
Saptak S 61e8173625 Use get_admin_display_title in PageChooserPanel 2020-09-28 17:21:12 +01:00
François Poulain 0c6815910b Stronger check on blocks names (#6295)
Ref: https://github.com/wagtail/wagtail-react-streamfield/issues/54
2020-09-28 14:31:39 +01:00
Matt Westcott c1da0fe56d Inline PDF serving doesn't only apply on the edit view 2020-09-28 13:56:11 +01:00
Matt Westcott 2590fab0b6 Release note for #6410 2020-09-28 13:53:49 +01:00
Matt Westcott 8edf16e5ff Serve PDFs inline in the browser
Fixes #1158
Add config options WAGTAILDOCS_CONTENT_TYPES and WAGTAILDOCS_INLINE_CONTENT_TYPES to determine the Content-Type and Content-Disposition headers returned for documents when using the Django serve view, and default to application/pdf being served inline.
2020-09-28 07:22:58 +10:00
Scott Cranfill 70bb9d934b
Support SVG icons in ModelAdmin menu items (#6402)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2020-09-25 15:58:52 +01:00
Matt Westcott 890974320f Fill in release date for 2.10.2 2020-09-25 11:05:22 +01:00
Matt Westcott 510e52923a Skip content comparison in create_log_entries where revision cannot be restored (#6407)
Fixes #6368
2020-09-25 10:14:36 +01:00
Coen van der Kamp 0338cc37f7
Add icon sprite caching via local storage (#6243)
Improve Wagtail admin page load performance by caching SVG icons sprite in localstorage

Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2020-09-24 20:12:32 +01:00
Matt Westcott 3300e3b851 Consistently show user's full name (where available) in reports (#6400)
Add user_display_name template filter to simplify user display code

This replaces the `{{ some_rambling_expression_evaluating_to_a_user.get_full_name|default:some_rambling_expression_evaluating_to_a_user.get_username }}` pattern used all over the place.

Display user's full name (where available) in LogEntry listings

Don't use full name if it consists of whitespace (which happens on our test user models)

release note
2020-09-24 16:16:19 +01:00
Martin Mena 3d7f2d0905 Add missing condition for StreamBlockComparison 2020-09-23 11:26:14 -04:00
Dan Braghis 55d82d6167 Limit page-editor input changes to non-submit inputs (#6397) 2020-09-23 11:50:19 +01:00
Dino Perovic 1267468c4c Check preview mode before displaying the button 2020-09-21 14:34:43 +01:00
Matt Westcott 69919d1687 Move #6369 to 2.10.2 release notes 2020-09-21 14:31:06 +01:00
Karran Besen 0c8ad63adb
Fix admin submit inputs focus (#6369)
* Fix admin submit inputs focus

Co-authored-by: Coen van der Kamp <coen@fourdigits.nl>
2020-09-17 11:04:18 +02:00
Andy Babic 1c67aa6a48 Release notes for Tests for #6141 2020-09-03 20:42:39 +01:00
Andy Babic 0d8301e28f Release notes for #6190 2020-09-03 20:11:22 +01:00
Andy Babic 10d68fdd09 Release notes for #6362 2020-09-02 20:42:56 +01:00
Vince Salvino 7ec4b516fa Specify required python versions (#6366) 2020-09-02 17:52:00 +01:00
Matt Westcott 461abec5b5 Release note for #6370 2020-09-02 10:36:27 +01:00
Karran Besen d9449150b5 Fix remove icon class from wagtail userbar icon 2020-08-28 10:35:51 +01:00
Matt Westcott 63702d368b Add release notes for 2.10.2 2020-08-28 10:35:37 +01:00
Matt Westcott 30c1a4132c Release note for #6335 2020-08-26 14:17:18 +01:00
Matt Westcott 3b361673ee Fill in release date for 2.10.1 2020-08-26 14:14:13 +01:00
Matt Westcott e3bbccd814 Fix timesince_last_update for naive datetimes (USE_TZ=False)
Fixes #6345
2020-08-25 15:11:24 +01:00
Matt Westcott 23bec4345b Release note for #6336 2020-08-24 09:48:00 +01:00
Matt Westcott b111e100a6 Release note for #6329 2020-08-17 17:55:14 +01:00
Matt Westcott 3f1b41b823 Release note for #6319 2020-08-17 16:58:19 +01:00
Matt Westcott 46e5dbb5b0 Release note for #6322 2020-08-17 16:58:18 +01:00
Matt Westcott 58f5c29252 Add release note sections for 2.10.1 2020-08-17 16:58:18 +01:00
Matt Westcott f1959717e9 Fill in release date for 2.10 2020-08-11 10:30:26 +01:00
Robbie Mackay 437e3b9258 Replace unidecode with anyascii in wagtail.core.utils.string_to_ascii
- Add anyascii to replace unidecode
- Update wagtail.core.utils.string_to_ascii to use anyascii.
- Anyascii has a similar but not exactly the same encoding - see updates to tests.

Refs https://github.com/wagtail/wagtail/issues/3311
2020-08-07 17:48:58 +01:00
Matt Westcott bb3243b9a9 Use https oembed endpoints where available
Fixes #6288
Many of the oembed endpoints currently listed with an http:// URL now redirect to https://. Changing these to https:// saves a redundant redirect and avoids failures where the http URL has been blocked (see #6288). Also simplified the patterns for matching http or https - the group in `http(?:s)?` is redundant and should just be `https?`.
2020-08-07 17:36:05 +01:00
Karl Hobley de6d14a667 Release notes for #6267 and #6268 2020-08-07 15:51:09 +01:00
Matt Westcott ba16b4125d Release note for Django 3.1 support 2020-08-06 11:26:39 +01:00
Karl Hobley cb4f98b5f1 Release note for #6290 2020-08-04 16:03:15 +01:00
Kalob Taulien f3a20e0488
Add wagtail --version 2020-08-03 07:20:43 -06:00
Jesse Menn b934194622
Make page-level actions accessible to keyboard users in page listing tables (#6280)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2020-08-01 21:52:28 +01:00
Karl Hobley f3f932d2e5
Add before_{create,edit,delete}_snippet hooks 2020-07-30 08:08:40 +01:00
Matt Westcott 7451500054 Add release note sections for 2.11 2020-07-28 12:53:22 +01:00
Matt Westcott 622d439e6d Release note for workflow 2020-07-24 17:11:08 +01:00
Thibaud Colas d97f940e58 Release notes for #5885 2020-07-23 13:56:12 +01:00
Matt Westcott b8848ae2f5 Release note for #6250 2020-07-22 17:44:52 +01:00
LB (Ben Johnston) 1b3d190b3f
Fix group permission checkboxes not being clickable in IE11. Fix #5903 (#6115)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2020-07-21 22:24:14 +01:00
LB (Ben Johnston) 45ec139bc5
Hide snippets’ bulk delete for screen reader users as well (#6116)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2020-07-21 21:06:45 +01:00
Andreas Bernacca f9c5bab9cb
Add chevron to dropdowns that are missing them, and make "Site" label translateable (#6242)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2020-07-21 20:13:25 +01:00
Martin Coote 9f0dcf0097
Add skip link for keyboard users. Fix #5406 (#5780)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2020-07-21 18:16:36 +01:00
Matt Westcott 5714c2f71d Release note for 2.9.3 2020-07-20 10:38:07 +01:00
Matt Westcott 457643e686 Release note for 2.7.4 2020-07-20 10:37:13 +01:00
LB (Ben Johnston) e097cfaab2 Changelog update for #6151 & #6189 2020-07-16 16:20:44 +10:00
Matt Westcott 1ed501e5af
Sanitise window.location.hash when passing to jquery for tab handling (#6155)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2020-07-15 16:20:39 +01:00
Matt Westcott 9917d7d2e9 Additional documentation for next_url 2020-07-15 11:53:39 +10:00
Matt Westcott ee954b8fe6 Release note for #5240 2020-07-13 18:32:01 +01:00
Matt Westcott 0546237a15 Release note for #6093 2020-07-13 14:03:18 +01:00
Matt Westcott 34785b9085 Release note for #6196 2020-07-03 19:19:41 +01:00
Matt Westcott 8b1699437f Release notes for 2.9.2 2020-07-03 12:58:19 +01:00
Maxxen 4afdbdea56 added maxNumChildBlocks property and callbacks to disable adding/removing child blocks to sequence. Also made streamfield add-buttons dissapear when capacity is reached (#6070) 2020-06-30 15:02:16 +01:00
Matt Westcott ccbbe8b8ee Release note for #6183 in 2.10 2020-06-30 14:25:30 +01:00
Andy Babic 58741d3989 Update Page.objects.specific() to warn instead of erroring when pages of the specific type cannot be found (#5928) 2020-06-30 14:23:25 +01:00
Matt Westcott 4ee07d8073 Fill in release date for 2.9.1 2020-06-30 11:53:42 +01:00
Matt Westcott 98301fe736 Release note for #6183 in 2.9.1 2020-06-30 11:49:55 +01:00
Seb b9347ee970 Add ability to extend EditHandler without a children attribute
- Only run checks on children for tabs that use BaseCompositeEditHandler (have children)
2020-06-30 07:08:03 +10:00
Matt Westcott 1b92c0a9ea
Upgrade jquery to 3.5.1 (#6167)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2020-06-27 08:22:13 +01:00
Dan Braghis 18fdd905d3 Release notes for #6125 and #6121 2020-06-26 11:12:35 +01:00
Samir Shah 30419231e5 Disable password auto-completion on UserForm password fields. (#6175) 2020-06-25 17:11:03 +01:00
Matt Westcott 3ec7eada56 Promote redirect importing to a major feature 2020-06-25 17:09:17 +01:00
Gassan Gousseinov a4e05f4538 I would like only add my own editor without to redefine a default one. (#6118) 2020-06-25 16:53:06 +01:00
Matt Westcott 8d21ad6e5a Release note for #6176 in 2.10 2020-06-25 10:31:29 +01:00
Matt Westcott 0067194d71 Release note for #6176 on 2.9.1 2020-06-25 10:29:52 +01:00
Matt Westcott 216dfdf459 Add release notes for Wagtail 2.9.1 2020-06-25 10:29:15 +01:00
Timothy Bautista cfc2bc8470
Fix minor typo in 2.10 changelog (#6140)
XLX/XLXS -> XLS/XLSX
2020-06-12 09:30:39 +01:00
Karl Hobley 06303c7169 Change contributor name for mozgsml to Nikolay Lukyanov 2020-06-09 11:04:13 +01:00
Karl Hobley 8d84f6a415 Changelog/release note/contributor for #6040 2020-06-09 09:42:48 +01:00
Martin Sandström 301d1bc7f5 Add ability to import redirects from a file wagtail.contrib.redirects
* Add support for importing redirects via tsv, csv, xls and xlsx files
* Add import_redirects management command to redirects documentation
2020-06-07 11:20:39 +10:00
Matt Westcott 6e9bcef5db Release note for #6013 2020-06-05 15:23:50 +01:00
Thibaud Colas df164a7e69 Fix JS not working in IE11 due to using unimplemented NodeList#forEach 2020-06-05 07:24:33 +10:00
Matt Westcott 67fc0d7787 Release note for #6046 2020-06-03 17:28:34 +01:00
Coen van der Kamp eb9cff7bf3 Drop null=True from Site.site_name
* Avoid using null on string-based fields such as CharField and TextField. If a string-based field has null=True, that means it has two possible values for “no data”: NULL, and the empty string.
* See: https://docs.djangoproject.com/en/3.0/ref/models/fields/#django.db.models.Field.null
2020-06-02 20:42:29 +10:00
Timothy Bautista 48511a7457 Strip HTML tags search index for RichTextBlock & RichTextField
* Add get_searchable_content function to RichTextField
* Fixes #6098
2020-06-02 20:34:38 +10:00
Matt Westcott ab71e515e4 Release notes for #6057 2020-05-27 18:17:04 +01:00
Dan Bentley f43db1e69e Fetch and apply annotations if using specific() 2020-05-24 10:09:45 +10:00
Coen van der Kamp a1a2c35c1c Template render richtext without wrapper, add wagtail.contrib.legacy.richtext
* Add wagtail.contrib.legacy.richtext with tests & docs
* Make RichText.__html__ behave the same as template filter
* Resolves #1214
2020-05-21 07:53:31 +10:00
Coen van der Kamp eed16e0034 Add SVG Icons and include in admin menu
* This commit only covers the migration of the icons in the menu and draftail editor. All
other admin menu icons remain implemented as before.
* Existing font based icon support still exists.
* Convert menu icons to SVG
* This could be considered a breaking change for any Wagtail sites or
packages that are leveraging Wagtail's Button and Icon React components.
* Remove references to unused `submenu-trigger` class
* Prefix icon `id`s with `icon-` to prevent `id` collisions
* Add hooks support (not yet documented) for adding custom icons
2020-05-21 07:36:33 +10:00
Matt Westcott dcb517f080 Changelog note for phrase search / search query expressions 2020-05-20 14:31:37 +01:00
Thibaud Colas 7eeb44ad04 Replace gulp-sass with gulp-dart-sass
* Rewrite Sass code that relies on deprecated or removed features in Dart Sass
* Remove unneeded rebuild of node-sass
* Update lockfile
2020-05-17 21:00:20 +10:00
Thibaud Colas 471823f238 Upgrade to Jest 23
* Jest 24 is out but upgrading to it would require us to also update our Webpack tooling to Babel 7, which is quite significant work.
* Rewrite Draftail initialisation tests to stop relying on jsdom script parsing
2020-05-17 20:35:00 +10:00
Lars van de Kerkhof 6194dcb74b Do not download entire search index on search terms with no hits
When a slice is specifically set to [0:0], which would yield an empty list,
instead wagtail will clear the slice, effectively downloading the entire search
index.

This scenario happens when a search term does not return any results.
So every time you enter a search term that has no results, the entire search
index is downloaded, you don't really feel it because wagtail only downloads
the pk values, and it is unlikely a site has millions of pages, but it is still
very inefficient and unwanted.
2020-05-15 11:45:54 +10:00
Coen van der Kamp 7253b2f6db Show userbar on moderation preview with approve and reject items
* Fixes #6008
* Regression from cbabc3d9c7
2020-05-15 11:30:42 +10:00
Kalob Taulien f757324039 Add Snippet hooks (after_edit_snippet, after_create_snippet and after_delete_snippet) 2020-05-14 20:47:36 +10:00
Robert Rollins 982b1d60a4 Page can_move permission method to ignore bulk_delete permission check
* bulk_delete exists to avoid allowing users to delete a whole lot of pages all at once by mistake, when they think they're just deleting one. However, the move/delete analogue breaks down when you're talking about moving an entire subtree, because you're *not* directly altering the children of the moved Page.
2020-05-10 21:12:24 +10:00
Brylie Christopher Oxley ff37ad6ab9 Add 'add_redirect' static method to Redirect
* This method was inspired by a Lacey Williams Henschel (@williln) presentation at Wagtail Space US 2018, called  'What the Wagtail docs don't tell you'. https://www.youtube.com/watch?v=PCkxBNXWM64&t=1220s
* Add docs section reference/contrib/redirects
2020-05-10 18:48:33 +10:00
Timothy Bautista ee99f91aa5 Add select_related to public_q query
* Prevents n+1 query count when getting a list of pages with view restrictions
* Add query count checks to public/not_public tests
2020-05-10 17:28:07 +10:00
LB d88dae75ae Fix back tick usage in changelog/release notes 2020-05-10 17:11:36 +10:00
Neal Todd 2b35a852fe Add Rustface to the feature detection docs (images) 2020-05-10 17:09:33 +10:00
LB Johnston 8fc722a6f3 Add ability to define form_classname on ListBlock & StreamBlock
* resolves #4042
2020-05-10 16:48:24 +10:00
Coen van der Kamp 68b2dc01c2 Render user bar on non page views
* resolves #5565
2020-05-10 16:10:45 +10:00
jacobtoppm 30c398c91a Add purge_revisions management command
* Fix typo in publish_scheduled_pages dry run
* Add purge_revisions to docs
* Resolves #5192
2020-05-08 11:35:30 +10:00
Liam Mullens 52cb7ab77b Update ImageRendition field to return Image alt text
* Update ImageRendtion to use default_alt_text property of Image
* Update example in documentation
* Add a test for ImageRenditionField
* Resolves #5816
2020-05-08 11:22:49 +10:00
Meteor0id 829a9bbf06
Add ability to replace the default Wagtail logo in the userbar, via `branding_logo` block (#4731) 2020-05-08 00:11:05 +01:00
Jérôme Lebleu f1dadba75a Remove FieldRowPanel top padding inside MultiFieldPanel
- fixes #5904
2020-05-07 22:55:25 +10:00
saeed 44c1f1cab2 Remove sticky footer on small devices 2020-05-07 22:55:25 +10:00
lukealhardwick 30a66638cb Add Reddit to oEmbed provider list
- Added endpoint for reddit comments to be embedded
2020-05-07 22:55:24 +10:00
Coen van der Kamp 758ebce865 Add ordering to Site
- Display domain names in switcher
- Ensure sorted values are shown in Site index view & Site switcher
2020-05-07 20:10:50 +10:00
Matt Westcott 4717c2c1c4 Release note for CVE-2020-11037 in 2.9 2020-05-04 13:28:18 +01:00
Matt Westcott f26d8ee72a Release note for 2.8.2 2020-05-04 13:28:11 +01:00
Matt Westcott e6accccfff Release note for 2.7.3 2020-05-04 13:28:04 +01:00
Matt Westcott 1ef36d0420 Fill in release date for 2.9 2020-05-04 11:35:15 +01:00
Rick van Hattem 40aedfc66b Show more granular error messages from Pillow (image uploads)
* Prevent `invalid_image` from hiding Pillow errors, instead rename key to `invalid_image_extension`
* Django already uses `invalid_image` - https://github.com/django/django/blob/stable/3.0.x/django/forms/fields.py#L639
* Add tests separate for images with invalid extensions vs non-images
2020-05-03 21:14:08 +10:00
Andy Babic 4846a3e801 Add get_page_url() method to BaseSetting
* adds a convenience `page_url` shortcut to improve how page URLs can be accessed from site settings in Django templates
2020-05-03 15:14:41 +10:00
Jonatas Baldin a7f58821a7 Add publish & unpublish page hooks
* Add `before_unpublish_page` and `before_unpublish_page` hooks
* Add `before_publish_page` and `before_publish_page` hooks
* Resolves #4590
2020-05-03 14:18:13 +10:00
Coen van der Kamp b98e6d7549 Accept ipv6 as domain
* fixes #2375
2020-05-02 10:23:57 +10:00
Jim Jazwiecki 6ea0cc52f3 Upgrade to Gulp v4 & Node 10
* Syntax changes to get Gulp working
* Require Node 10, use node 10 in CircleCI and squash.yml
* Update docs
* resolves #5653
2020-05-01 12:01:03 +10:00
François Poulain 55e65be079 allows unicode string in page copy form (#5991)
* resolve #5990
2020-04-29 18:28:56 +01:00
Tomas Walch 9987c46647 Fix for Issue #5975: Adds "Cache-Control: private" in serve_preview to bypass caching. (#5986) 2020-04-28 16:28:39 +01:00
Chrisranjana.com 1f421e35f0 Add ability to sort search promotions on listing page
* resolves #3897
2020-04-28 20:44:54 +10:00
Andy Babic 3fe8775024 Add pre_page_move and post_page_move signals
* Documentation for pre_page_move and post_page_move signals
* Resolves #2728
2020-04-28 20:26:40 +10:00
Thibaud Colas 2af880025a
Revert "Add role="table" to TableBlock output" (#5977) 2020-04-28 09:02:38 +01:00
Haydn Greatnews 165c5c0ce5 Add date & datetime formatting to AbstractEmailForm + split out render_email method
* Rewrite AbstractEmailForm render to use cleaned_data
* Add date time formatting to AbstractEmailForm's render method according to Django settings SHORT_DATE_FORMAT and
SHORT_DATETIME_FORMAT
* Previously it was iterating over `form` which left no place to remove
data from the submission without removing the field from the form (which
is inadvisable, as discussed on #4313)
* Preserve order of fields in form emails using cleaned data
* Add a test for consistent date rendering in email forms
* update form customisation examples and add note about date / time formatting in email form usage (docs)
* resolves #3733
* resolves #4313
2020-04-26 20:25:48 +10:00
Ascani Carlo 5f3c12682f Redirect to previous url when deleting/copying/unpublish a page
* modify register_page_listing_buttons & register_page_listing_more_buttons to handle next_url kwarg
* resolves #3010
2020-04-26 18:24:13 +10:00
Karran Besen 7565248438 Add the ability to view users in a group
* adds users view to group view (users filtered by that group)
* adds the ability to go to the users list for the group currently being edited (via header link)
* fix issue where the link to add a new user (when no users found) was broken
* resolves #5801
2020-04-26 17:55:09 +10:00
Matt Westcott ff47c58d65 Drop support for Python 3.5 2020-04-24 14:58:55 +01:00
Matt Westcott 5444b2663f Release note for #5959 2020-04-22 16:06:04 +01:00
Matt Westcott 4ba901691b Add changelog / release notes for 2.10 2020-04-22 13:54:09 +01:00
Matt Westcott f06270345f Fix incorrect language code for Japanese in language choice dropdown
Fixes #5925
2020-04-21 13:56:55 +01:00
jacobtoppm df8e51a6e9 Fix user preferred language override not working with TemplateResponses by decorating TemplateResponse render method (#5910) 2020-04-20 12:23:47 +01:00
Matt Westcott 58b11833c8 Add placeholder docs for internationalisation 2020-04-20 21:04:00 +10:00
Matt Westcott 4a0d202fc7 Release note for #5927 2020-04-20 11:56:09 +01:00
Matt Westcott 4023a90d6e Allow custom image model to have fields defined as required
If validation rules prevent the multiple image upload view from
creating Image objects from just the image file, an UploadedImage object is
created instead, and turned into an image once the form is filled in.

* Fixes #847
* Add UploadedImage model and related views
* Update custom image model docs
2020-04-20 14:46:24 +10:00
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
Saptak S eda098de58 Abort unfinished ajax before new calls in all search ajax 2020-01-17 17:41:51 +00:00
Eric Sherman f5f841ed59 dropdown on search page by initing dropdowns on ajax success 2020-01-17 16:56:21 +00:00
Kalob Taulien aefb0f9506 Responsive emebed setting 2020-01-17 16:44:46 +00:00
Matt Westcott 7a92ca5ad9 Mark nested InlinePanels as experimental for now
See https://github.com/wagtail/wagtail/issues/5126#issuecomment-575607574, https://github.com/wagtail/wagtail/pull/5732#issuecomment-574753410
2020-01-17 13:00:50 +00:00
Matt Westcott 590bea3b7b Revert "Fix submenu footer blocking items in admin" (#5606)
This change causes the footer to no longer be bottom-aligned when the menu is shorter than window height.

This reverts commit a459e91692.
2020-01-17 12:58:20 +00:00
Andy Chosak 349fca66f3 Fix: Properly save ordering of nested InlinePanels
The order of nested InlinePanels (recently formally added in 5566)
doesn't get saved properly due to some now-invalid assumptions in the JS
selector code.

Currently, Wagtail users can use the editor up/down arrows to order
InlinePanel elements that contain child InlinePanels, but these may not
be properly saved.

Before InlinePanel nesting was supported, it was a safer bet that a
child panel would only contain one hidden input named "-ORDER". With
nesting, however, a parent panel will also contain hidden inputs named
like this for its child panels. This breaks the logic used in the
ordering code.

This change modifies the logic to use the jQuery `.children()` selector
instead of `.next()`, ensuring that we reference the correct adjacent
panel item.

An easy way to test this against current master is to use the Wagtail
testapp test models that exercise this behavior:

1. `wagtail start testwagtail` to create a new project.
2. `cd testwagtail`
3. Edit testwagtail/settings/base.py to add the Wagtail test
application `'wagtail.tests.testapp'` to the list of `INSTALLED_APPS`.
For the admin to work properly with this app, you also need to add
`'wagtail.contrib.settings'` to that list and copy the definition of
`WAGTAILADMIN_RICH_TEXT_EDITORS` from wagtail/tests/settings.py.
4. `./manage.py migrate` to create your local database.
5. `./manage.py createsuperuser` to create an admin user.
6. Create a new Event Page
(http://localhost:8000/admin/pages/add/tests/eventpage/3/).
7. Fill in all required items, and then add multiple speakers under
"Speaker Lineup". For each speaker, add at least one Award. Save the
page.
8. Try using the up/down arrows to reorder the speakers (the parent
InlinePanel), and save the page.
9. Note that when the page reloads, the ordering hasn't been saved. If
you debug using the developer tools, you'll notice that this is because
the code being modified here selects the child panel items instead of
the adjacent parent panel item.
2020-01-15 16:43:32 +00:00
Ascani Carlo 4864920555 Fix update_index throwing AttributeError when value is None (#5757) 2020-01-14 11:33:25 +00:00
Dan Braghis c4a0ec2c4f Use sensitive_post_parameters on password reset form (#5760) 2020-01-14 11:13:21 +00:00
Matt Westcott e927f6269a Release note for #5634 2020-01-08 15:43:34 +00:00
Matt Westcott 7fdb06c86c Fill in release date for 2.7.1 2020-01-08 10:39:45 +00:00
Matt Westcott 8c49f2e68d Release notes for #5694 2020-01-07 17:03:09 +00:00
Johannes Vogel 4a1b337461 add etag support for documents 2019-12-18 15:28:23 +00:00
Matt Westcott 110101d96e Make Django 3.0 support official 2019-12-17 14:24:31 +00:00
Janneke Janssen 146853914e Add verbose_name_plural to form submission due to translation mismatch 2019-12-17 12:28:56 +00:00
Nick Smith 7acf4889db Move wagtail_urls to the end of template urls.py (#5733)
The `wagtail_urls` patterns is a catch-all list of urlpatterns, and will
prevent any patterns later in the list from being matched. The default
case when Django is in debug mode for local development is to use
`django-admin.py runserver`, and in this case the static patterns in the
example [are redundant][1]. However for anyone using a different server
for local development, this makes them work again.

[1]: https://docs.djangoproject.com/en/3.0/howto/static-files/#serving-static-files-during-development
2019-12-17 12:24:24 +00:00
Matt Westcott 4001516a27 Add formal support for nested InlinePanels
Fixes #1952 and #5511
2019-12-02 10:20:45 +10:00
Benedikt Willi 233e7f5189 Add ability to filter image index by a tag
- Fixed error when searching and filtering by tag at the same time
2019-12-02 09:54:35 +10:00
Dan Swain 749d0172e5 Documentation - include {{ block.super }} example in modelAdmin 2019-12-02 09:43:33 +10:00
Andreas Bernacca 4945acf2db Update document size & hash when changing document file
Resolves #5704
2019-12-01 19:00:57 +10:00
Andreas Bernacca 5a8f468c2d Fix layout issue when using FieldRowPanel with a heading
Resolves #5691
2019-12-01 18:20:44 +10:00
Pete Andrew abd8320dc3 Update links in docs to point at stable Django version 2019-12-01 13:19:40 +10:00
Karl Hobley 0dbe25c512 Changelog/release note for #5721 2019-11-26 15:50:44 +00:00
Andreas Bernacca 3cb59c2667 Remove Page & Site models from Django admin
- added instructions to release notes on how to reinstate on a per project basis
- Resolves #5703
2019-11-26 22:49:48 +10:00
Timothy Bautista 1b0aed7b20 use block.super in extra CSS/JS blocks
- ensure templates that have extra css/js blocks call {{ block.super }} in them
- wagtail.contrib.settings edit
- modeladmin templates
2019-11-20 20:34:00 +10:00
Karl Hobley d37d5c1c60 Changelog/release notes for #5676 and #5688 2019-11-19 14:50:01 +00:00
Tom Usher 644ee86e00 Add support for cloudflare API tokens (#5688) 2019-11-19 14:47:52 +00:00
LB 9b64a8647c Update contributor name 2019-11-16 18:28:21 +10:00
Brady Moe f8c7d7f5f7 adds mark_safe to the render_form method on the structblock (#5687) 2019-11-08 11:03:09 +00:00
WinterComes 06fb0764e0 Move get_document_model to __init__ & add get_document_model_string
Avoids issues where models are not yet loaded and document model is needed.

- apply isort
- fix minor typos
- fixes #5614
2019-11-07 07:47:12 +10:00
Matt Westcott e756a1879d Add release note for dropping Django 2.0 support 2019-11-06 17:10:32 +00:00
Fidel Ramos b9f585a6c9 Compare foreign keys using pk, not id (#5681)
Trying to compare revisions of a page that includes changes to a foreign key
field of a related model that declared a custom primary key failed with an
uncaught exception.

The root cause was ForeignObjectComparison filtering by the id field, which is
not present in models that declare a custom primary key.

The solution is simply to filter by pk instead of id, which always maps to the
primary key of the corresponding model.

Include a regression unit test.
2019-11-06 17:00:41 +00:00
Matt Westcott 39422b259e Fill in release date for 2.7 2019-11-06 13:06:22 +00:00
Nick Smith 1c1341e477 Improve contrast of disabled inputs
Fixes #5649
2019-11-03 07:41:08 +10:00
Matt Westcott 6ce9f3a717 Unbundle the l18n library
This was previously bundled in #4721 to avoid installation errors on non-Unicode locales. As of v2018.5, this has now been fixed upstream: https://bitbucket.org/tkhyn/l18n/issues/4/setuppy-raises-unicodedecodeerror-trying

isort fix
2019-10-30 08:03:41 +10:00
Karl Hobley 40dbb940e7 Improve diffing behavior for text fields 2019-10-29 17:22:49 -04:00
LB 34db9a394f Fix contributor name
- incorrectly added the issue creator not the PR creator
- updated name to the correct one - Stefani Castellanos
2019-10-29 08:23:44 +10:00
Stefani Castellanos 92864f22b4 Added label 'URL' for external link
- Regression - missing label for external link URL field in link chooser
- Resolves #5656
2019-10-29 08:19:31 +10:00
Igoranze a459e91692 Fix submenu footer blocking items in admin
- items longer then the page height are no longer broken by the submenu footer
- long lists of submenu items are no longer blocked by the footer (version number)
2019-10-24 08:17:55 +10:00
David b6c5eaccfc Fixed 2.6.3 date in Changelog and updated username on Contributors 2019-10-24 07:42:16 +10:00
LB 57d44a38bd Admin documents listing - rename 'uploaded' to 'created
Other changes

- documents listing template - clean up white space

Documentation changes (editors manual)

- update images
- remove popular tags mention as this is no longer applicable
- add references to 'collection'

Resolves #2827
2019-10-24 07:40:59 +10:00
Sergey Fedoseev eab9198f4c Move flake8 config to setup.cfg 2019-10-23 18:09:07 +02:00
Sergey Fedoseev 40e56cbd7a Remove RichText.__nonzero__() unused on Python 3 2019-10-23 18:05:42 +02:00
Loic Teixeira 80c70c5de8 Add 2.8 section to changelog and release notes 2019-10-23 17:52:20 +02:00
Matt Westcott a5d54a587b Mark Python 3.8 support as official in changelog 2019-10-22 16:25:59 +01:00
Matt Westcott 96c1c41daa Release note for #5643 in 2.7 2019-10-22 16:14:25 +01:00
Matt Westcott f1c79e169a Release note for #5643 in 2.6.3 2019-10-22 16:14:17 +01:00
Matt Westcott fe9132823a Changelog cleanup
* note Python 3.8 support as provisional
* Remove mentions of minor doc fixes (there are many more fixes beyond the ones mentioned here, and including them all in the release notes would add too much noise...)
2019-10-16 18:17:17 +01:00
Matt Westcott 302d22e252 Release note for #5249 / #5629 2019-10-16 16:21:26 +01:00
Matt Westcott 3024e02481 Revert "Formalise Python 3.8 support"
This reverts commit ddbbaea288.
2019-10-16 14:27:59 +01:00
Karl Hobley b4ecead6d9 [5225] Take number of frames into account when limiting image size 2019-10-16 11:36:07 +01:00
Matt Westcott ddbbaea288 Formalise Python 3.8 support 2019-10-15 20:08:04 +01:00
LB (Ben Johnston) 03cd4056df Docs - Add AbstractUser import to custom user model
- `from django.contrib.auth.models import AbstractUser`
- revise a previous changelog entry to clarify 'clean up' vs 'fix'
2019-10-12 09:57:47 +10:00
Matt Westcott 9d7d09bd75 Replace format() placeholders in translatable strings with % formatting
Fixes #5539. Transifex and Django's makemessages command have validation to catch invalid placeholder variables within translated strings - for example, where the translator has translated the variable name - but these only recognise old-style `%` formatting, not the `format` method, and so it's better for us to standardise on % formatting.

To reduce the burden on translators having to re-translate these strings, only the ones using named placeholders (`"Edited page {title}"`) rather than numeric ones (`"Edited page {0}"`) have been changed - hopefully the latter give less room for error.

Also fixed some incorrect use of plurals (verbose_name vs verbose_name_plural) in snippet confirmation messages.
2019-10-12 09:46:57 +10:00
David Thompson 6a6555eb19 Fix multiple minor documentation issues
- Typo in readme (verb did not agree with the subject)
- Grammatical error in topics/pages
- #5364 - Update URL config code block in getting-started/integrating-into-django
2019-10-12 09:42:02 +10:00
a-mere-peasant 1eae1e4614 Added 'image uploads in forms' to third party tutorials 2019-10-12 09:31:19 +10:00
Matt Westcott a0035c33c0 Add example of template rendering to TableBlock docs
Addresses #5540
2019-10-12 09:29:10 +10:00
Matt Westcott 72ba719ac8 Remove mentions of Django 3.0 compatibility from release notes
Work on compatibility is ongoing while Django 3.0 is still in development; we don't want this to be misinterpreted as a statement of formal Django 3.0 support (which we can't promise until the final release)
2019-10-11 12:28:01 +01:00
Matt Westcott ee68d2214a Release note for #5500 / #5612 2019-10-11 12:18:34 +01:00
Karl Hobley 0507ec5377 Release notes for #5611 2019-10-10 11:03:39 +01:00
Matt Westcott e1d3390a1f Release note for #5527 2019-10-09 12:53:58 +01:00
Sergey Fedoseev b9c470df37 Output form media on add/edit/chooser document forms with custom models
Similar to eaad013081, but for Document
2019-10-02 12:54:27 +01:00
Sergey Fedoseev bbec0c8bc8 Make DraftailRichTextArea be considered as visible (#5583) 2019-10-01 17:31:23 +01:00
Matt Westcott 9a21e79ff8 Add role="table" to TableBlock output
As per https://twitter.com/SaraSoueidan/status/1177622630763028480, certain browsers apply heuristics to decide whether `<table>` elements exist for layout or data purposes, and adjust the behaviour of their accessibility features accordingly. Given that TableBlock intentionally doesn't allow markup within cells, we can be reasonably sure that any tables created with it are genuine data tables, and should therefore indicate that using `role="table"`.
2019-10-01 17:27:32 +01:00
Matt Westcott 44a1e6f9f8 Eliminate dependency on default User model from style guide
Fixes #5442. Building a User object for david@torchbox.com may cause problems if a custom user model is in use, and is redundant anyhow because there's no longer a registered gravatar for that email - we should just hard-code the default blank avatar instead.
2019-09-29 09:10:17 +10:00
Brian Whitton 34f4ab8a3f allow image page sizes to be configurable (#5568) 2019-09-25 10:49:57 +01:00
jacobtm a7b470bc9d Add ability to hide 'Submit for Moderation' in action menu using setting WAGTAIL_MODERATION_ENABLED. When set to false, SubmitForModerationMenuItem method is_shown returns false (#5574) 2019-09-24 16:28:47 +01:00
Matt Westcott e87dcaf015 Release note for #5296 2019-09-23 01:25:23 +01:00
Matt Westcott 88a688afe7 Fill in release date for 2.6.2 2019-09-19 15:05:20 +01:00
Kiril Staikov 4b692d67d5 Fix soundcloud embed regex 2019-09-13 12:33:40 +01:00
Matt Westcott 0d4f670625 Release note for #5559 2019-09-11 13:00:11 +01:00
Edy b9cfc24b37 Fixed broken email header when hosting static files remotely (#5543)
Fixes #5525
2019-09-06 12:13:07 +01:00
Colin Klein 33204be105 Updated the block id initialization (#5552)
The current block id generation only sets the id as the block is serialized for storage in the database, which means that the id is unavailable in the block until it is pulled back from the database. In my debugging this caused the id to be set to new values up to 3 times when saving a brand new page (each time with a new id).
This updated logic applies the new id to the actual block which makes it available right away and prevents the id from being regenerated.
2019-09-06 11:21:46 +01:00
Janne Alatalo dd0bb9a870 Add setting to disable email management
This commit adds WAGTAIL_EMAIL_MANAGEMENT_ENABLED setting that defaults
to True, but when disabled, hides the 'Change email' button in account
management view, and disables the associated route. This is useful when
using external authentication method like LDAP or OpenID Connect where
email management is handled elsewhere.

Wagtail already includes WAGTAIL_PASSWORD_MANAGEMENT_ENABLED setting.
This is almost exact copy of that implementation.
2019-09-04 10:25:35 +01:00
Bojan Mihelac df1608b080 fix: Language chosen in user preferences persists on subsequent requests (#4310) 2019-09-02 19:34:06 +01:00
Robert Rollins ef4b37cf5d Changed Snippet Chooser AJAX delay from 50ms to 200ms, to remove laggy typing. (#5439)
50ms is the equivalent of about 200 words per minute, so typing slower than that
meant that the javascript would send an AJAX request between every single
keystroke. This change makes the javascript wait for 200ms between keystrokes,
which lets you finish typing the word you're looking for before it sends an AJAX
request.
2019-08-29 14:13:23 +01:00
kevinhowbrook 7db44c71b3 Break listing titles by word so action buttons are visible on smaller screens (#5429) 2019-08-29 14:06:16 +01:00
kevinhowbrook 48c82516db Allow content to define the tab width on xs screens to stop cutting off text (#5392) 2019-08-29 12:27:32 +01:00
Matt Westcott e263aaf749 Update release schedule info and move dates table to the wiki
Document release schedule in readme
2019-08-23 13:15:24 -04:00
Matt Westcott 6feb29d54a Release note for StreamField design update (#5476) 2019-08-23 15:53:48 +01:00
Kalob Taulien f227ec0a82 Updated contributors & changelog 2019-08-21 20:01:25 -06:00
Pavel Denisov d6e4072e26 Remove Unidecode from postgres_search. Fix #5001 (#5514) 2019-08-20 16:12:35 +01:00
kevinhowbrook 31e3dab4ec Allow users to change their first and last name 2019-08-18 17:08:52 +10:00
Mikalai Radchuk d2d8b2c9e3 Fixes layout for the FileField 2019-08-18 16:55:36 +10:00
Matt Westcott dc780c5bb1 Fix failing tests due to different HTML escaping in Django 3.0
- Fix password reset tests
- Fix test for invalid-slug message
- Update changelog/release notes
2019-08-18 16:40:37 +10:00