Wykres commitów

13681 Commity (66c917b59624dfc2f6970d623bf18066622557dc)

Autor SHA1 Wiadomość Data
Matt Westcott 66c917b596 Release note for #8973 in 4.0 2022-08-19 11:29:06 +01:00
Matt Westcott 4ca9ba288b Release notes for #8940 and #8973 in 3.0.2 2022-08-19 11:28:00 +01:00
Matt Westcott 5c495a2cd1 Fix updatemodulepaths for Python 3.7
Fixes #8970. Python 3.7 incorrectly opens the stream for writing in text mode (be6dbfb43b), so work around this by writing the unicode string back rather than encoding back to bytes.

This will probably fail if we're on Windows AND Python 3.7 AND encounter non-ASCII characters (because in that case it'll be open for writing as Windows-1252 encoding), but it's probably the best we can do without abandoning the fileinput library entirely.
2022-08-19 11:27:07 +01:00
PaarthAgarwal 9a97bba546 Ensure screen readers are made aware of page level messages
- when added dynamically to the top of the page
- already added to the authentication pages via #8925
2022-08-19 17:49:02 +10:00
Matt Westcott cdcf4d0353 Fix dead Transifex links 2022-08-19 17:30:20 +10:00
Matt Westcott d3412377b0 Version bump to 4.0rc2 2022-08-18 13:20:57 +01:00
Sage Abdullah 3356b41859 Fix live preview error banner overlapping with preview mode selector 2022-08-18 12:40:06 +01:00
Matt Westcott 933aff2974 Fetch new strings from Transifex 2022-08-18 12:34:04 +01:00
Matt Westcott 2463a4103c Rebuild translation strings following #9042 2022-08-18 12:33:56 +01:00
Matt Westcott 0aed9c81d9 Fix plural handling for "no permission to delete these snippets" errors
`./manage.py compilemessages` does not allow variables to differ between the singular and plural forms - it fails with

    a format specification for argument 'snippet_type_name', as in 'msgstr[0]', doesn't exist in 'msgid_plural'

It's not possible to use the gettext pluralisation mechanism properly here, because we're using Django's verbose_name and verbose_name_plural properties which don't cover the requirements of languages with complex pluralisation rules. Since we can only hope to support English-style (`if n == 1`) pluralisation, use an n==1 test directly (as we have elsewhere in the template) rather than trying to shoehorn this into gettext pluralisation.

While we're at it, remove the capitalisation of the snippet name - it makes no sense here (especially when only done for the plural).
2022-08-18 12:33:46 +01:00
Sage Abdullah 3a3a2bb294 Explicitly specify get_preview_template and get_preview_context parameters 2022-08-18 10:28:13 +01:00
Thibaud Colas 348a343537 Upgrade to latest Draftail RC, fixing command palette selection issue 2022-08-18 10:02:13 +01:00
Matt Westcott 5b18769e27 Fix error insertion logic for modal upload forms
Fixes #9019

* The `[data-field]` element (not the input) should be queried to find the `[data-field-errors]` element
* The code should not assume the presence of an icon element
2022-08-18 09:33:40 +01:00
Thibaud Colas 70a3e1e775 Add more items to 4.0 release notes (#9032) 2022-08-18 09:48:28 +02:00
Matt Westcott b824ec026b Ensure telepath adapter gets registered for document chooser widget
Fixes #9010. `wagtail.documents.widgets` is no longer reliably imported on startup now that the chooser widget is constructed within wagtail.documents.views.chooser instead, so the telepath adapter wasn't getting register. This meant that DocumentChooserBlocks in StreamField were using the base chooser implementation, which didn't include customisations such as populating the title field from the file upload field. Fix this by making ChooserViewSet responsible for registering the telepath adapter.
2022-08-17 18:24:45 +01:00
Matt Westcott e1c8a41117 Use correct classnames for showing/hiding edit button on chooser widget
Fixes #9008
2022-08-17 07:51:27 +10:00
Stefan Hammer 95a8a418f8 Fixed init method of legacy BaseSetting class
The "return" statement was only a minor improvement, the breaking code was the passed "self" argument.

- fixes #8996
- fixes #9006
2022-08-17 07:51:15 +10:00
Matt Westcott 8e5d5d635f Fix DocumentChooserBlock deconstruction for custom document models
Fixes #8989. The previous fix #9004 failed for custom document models because ChooserViewset assigns an internal name for the ChooserBlock class based on the model name, and if this is anything other than Document it won't match the name DocumentChooserBlock that it's exposed under in wagtail.documents.blocks. Fix this by replacing the `block_class` property with a `get_block_class` method that lets us specify the class name. As a bonus, user code that defines chooser blocks no longer has to directly hack the `__module__` attribute.
2022-08-16 20:50:22 +01:00
Matt Westcott 127d8c7203 Add missing chevron-down.svg
Fixes #8988
2022-08-16 20:49:36 +01:00
LB Johnston c579a93eae fix up legacy release note refs & use consistent format
- fix some broken refs that were lost in the migration to markdown files
- use lower_snake_case for all internal refs (most follow this convention)
- release process sub-section in docs should be named release schedule instead
2022-08-16 12:43:24 +01:00
LB Johnston eada3b4f8b fix various typos and backtick usage in 4.0 changelog/release notes
- adds a ref to the new setting added for `WAGTAILADMIN_UNSAFE_PAGE_DELETION_LIMIT` - see #8703
2022-08-16 12:37:41 +01:00
LB Johnston 0174207e81 add changelog for #9000 2022-08-16 07:59:09 +10:00
Sage Abdullah 55c1f35ea8 Improve Revision model docs 2022-08-16 07:59:09 +10:00
Sage Abdullah 3ce83f8fe8 Add docs for PreviewableMixin 2022-08-16 07:59:09 +10:00
Sage Abdullah b04607adfb Add docs for DraftStateMixin 2022-08-16 07:59:09 +10:00
Sage Abdullah dc2c5f5d90 Add docs for RevisionMixin 2022-08-16 07:59:09 +10:00
Sage Abdullah 8036fc65f4 Improve Page model reference documentation
- Use inline code for `Locale` and `TranslatableMixin` headers to be consistent with other classes in the page
- Move `locale` and `translation_key` of `TranslatableMixin` to its own "Database fields" section
- Add missing periods in Page.update_aliases parameter description
2022-08-16 07:59:09 +10:00
LB Johnston d16695fcb2 add changelog for #8993 & #9005 2022-08-16 07:42:13 +10:00
Matt Westcott 5324720899 Ensure DocumentChooserBlock can be deconstructed for migrations
Fixes #8989. Now that DocumentChooserBlock is constructed dynamically via wagtail.documents.viewsets.chooser, we need to explicitly set its `__module__` attribute so that the result of calling `deconstruct()` for migrations points back to the wagtail.documents.blocks module.

Also update the documentation for defining custom choosers, and add tests for deconstructing the other chooser blocks.
2022-08-16 07:42:07 +10:00
PaarthAgarwal fa0a2aa075 fixed console error for breadcrumbs 2022-08-16 07:41:23 +10:00
Matt Westcott 1d33591820 remove stray console-log from page-editor.js 2022-08-16 07:41:13 +10:00
Matt Westcott 8928686f04 Update CONTRIBUTORS.rst with new translators 2022-08-12 14:54:56 +01:00
Matt Westcott b3bf24584f Version bump to 4.0rc1 2022-08-12 14:13:59 +01:00
Matt Westcott a568b59808 Generate new strings for translation 2022-08-12 14:07:32 +01:00
Matt Westcott 9ee67a5fef Fetch new translations from Transifex 2022-08-12 14:06:14 +01:00
Matt Westcott f24bccc3df Set BaseSetting deprecation to 5.0 2022-08-12 13:49:09 +01:00
Thibaud Colas ca7f23d176
Update InlinePanel and StreamField styles for new designs (#8983) 2022-08-12 13:17:40 +01:00
Sage Abdullah 6d3ea0cb3e Add unpublish view and action menu item for snippets with DraftStateMixin 2022-08-12 14:00:59 +02:00
Sage Abdullah 2d23aea9bd Create new UnpublishView for reuse outside of pages 2022-08-12 14:00:59 +02:00
LB (Ben Johnston) 6a11ae711a
Only use hidden until-found in panels if browsers supports it (#8962) 2022-08-12 12:19:48 +01:00
Matt Westcott d202624458 Set atomic = False when renaming PageRevision table
This allows it to complete on SQLite <3.26, as per https://github.com/wagtail/wagtail/issues/8635#issuecomment-1209385465
2022-08-12 09:52:02 +01:00
LB Johnston 51dfcd2fd9 changelog entry for #8873 2022-08-12 17:35:42 +10:00
Matt Westcott 5466981f96 rename show_locale_labels attribute to i18n_enabled
It brings the whole locale filtering logic into play, so it's used for more than just showing labels or not
2022-08-12 17:35:42 +10:00
Matt Westcott ff121bfa90 Split out get_object_list and filter_object_list methods from browse view 2022-08-12 17:35:42 +10:00
Matt Westcott 8dd7a4cc93 Make show_locale_labels a property of the relevant column objects
This saves having to pass it in the template context
2022-08-12 17:35:42 +10:00
Matt Westcott 89c2d705a2 Extract a common base class for the link form views 2022-08-12 17:35:42 +10:00
Matt Westcott 84a8faaaa1 Split link form views into get/post cases 2022-08-12 17:35:42 +10:00
Matt Westcott 6c8b3de3e2 Convert page chooser views to class-based views 2022-08-12 17:35:42 +10:00
Matt Westcott 267cac0fe1 Remove outdated fixme comment and redundant results_only parameter 2022-08-12 17:35:42 +10:00
LB Johnston 3e6e9eb618 update docs/test spelling of colour 2022-08-12 17:29:16 +10:00