Remove old versionadded / versionchanged notes

pull/10071/head
Matt Westcott 2023-04-21 12:18:28 +01:00 zatwierdzone przez Matt Westcott
rodzic 459fbb2cc9
commit 4a47bc611b
8 zmienionych plików z 2 dodań i 57 usunięć

Wyświetl plik

@ -210,10 +210,6 @@ class Migration(migrations.Migration):
## StreamField data migrations
```{versionadded} 4.2
The `wagtail.blocks.migrations` modules were added.
```
Wagtail provides a set of utilities for creating data migrations on StreamField data. These are exposed through the modules:
- `wagtail.blocks.migrations.migrate_operation`

Wyświetl plik

@ -143,10 +143,6 @@ def locked_for_user(self, obj, user):
return user != self.user
```
```{versionchanged} 4.2
This method was previously named ``page_locked_for_user``, using ``page_locked_for_user`` will be removed in a future release. Along with the other similar methods, the ``obj`` parameter was previously named ``page``.
```
`Task.get_actions(obj, user)`:
This returns a list of `(action_name, action_verbose_name, action_requires_additional_data_from_modal)` tuples, corresponding to the actions available for the task in the edit view menu.

Wyświetl plik

@ -151,10 +151,6 @@ The third-party dependencies of this backend are:
| [`azure-identity`](https://pypi.org/project/azure-identity/) | No | Obtaining credentials. It's optional if you want to specify your own credential using a `CREDENTIALS` setting (more details below). |
| [`azure-mgmt-resource`](https://pypi.org/project/azure-mgmt-resource/) | No | For obtaining the subscription ID. Redundant if you want to explicitly specify a `SUBSCRIPTION_ID` setting (more details below). |
```{versionchanged} 4.1
Support for versions of `azure-mgmt-cdn` below 10.0 is deprecated and will be dropped in a future release.
```
Add an item into the `WAGTAILFRONTENDCACHE` and set the `BACKEND` parameter to `wagtail.contrib.frontend_cache.backends.AzureCdnBackend`. This backend requires the following settings to be set:
- `RESOURCE_GROUP_NAME` - the resource group that your CDN profile is in.
@ -205,10 +201,6 @@ The third-party dependencies of this backend are:
| [`azure-identity`](https://pypi.org/project/azure-identity/) | No | Obtaining credentials. It's optional if you want to specify your own credential using a `CREDENTIALS` setting (more details below). |
| [`azure-mgmt-resource`](https://pypi.org/project/azure-mgmt-resource/) | No | For obtaining the subscription ID. Redundant if you want to explicitly specify a `SUBSCRIPTION_ID` setting (more details below). |
```{versionchanged} 4.1
Support for versions of `azure-mgmt-frontdoor` below 1.0 is deprecated and will be dropped in a future release.
```
Add an item into the `WAGTAILFRONTENDCACHE` and set the `BACKEND` parameter to `wagtail.contrib.frontend_cache.backends.AzureFrontDoorBackend`. This backend requires the following settings to be set:
- `RESOURCE_GROUP_NAME` - the resource group that your Front Door instance is part of.

Wyświetl plik

@ -603,11 +603,7 @@ This mixin requires {class}`~wagtail.models.RevisionMixin` to be applied. Pages
## `LockableMixin`
`LockableMixin` is an abstract model that can be added to any non-page Django model to allow its instances to be locked.
Pages already include this mixin, so there is no need to add it.
```{versionadded} 4.2
The model is added to allow snippets to be locked. See [](wagtailsnippets_locking_snippets) for more details.
```
Pages already include this mixin, so there is no need to add it. See [](wagtailsnippets_locking_snippets) for more details.
### Database fields
@ -647,11 +643,7 @@ The model is added to allow snippets to be locked. See [](wagtailsnippets_lockin
## `WorkflowMixin`
`WorkflowMixin` is a mixin class that can be added to any non-page Django model to allow its instances to be submitted to workflows.
This mixin requires {class}`~wagtail.models.RevisionMixin` and {class}`~wagtail.models.DraftStateMixin` to be applied. Pages already include this mixin, so there is no need to add it.
```{versionadded} 4.2
The model is added to allow snippets to be submitted for moderation. See [](wagtailsnippets_enabling_workflows) for more details.
```
This mixin requires {class}`~wagtail.models.RevisionMixin` and {class}`~wagtail.models.DraftStateMixin` to be applied. Pages already include this mixin, so there is no need to add it. See [](wagtailsnippets_enabling_workflows) for more details.
### Methods and properties
@ -908,10 +900,6 @@ Workflow states represent the status of a started workflow on an object.
The object on which the workflow has been started. For page workflows, the object is an instance of the base ``Page`` model.
.. versionchanged:: 4.2
This field has been changed from a ``ForeignKey`` to ``Page`` into a :class:`~django.contrib.contenttypes.fields.GenericForeignKey` to any Django model instance.
.. attribute:: content_type
(foreign key to :class:`~django.contrib.contenttypes.models.ContentType`)
@ -1082,10 +1070,6 @@ Task states store state information about the progress of a task on a particular
The revision this task state was created on.
.. versionchanged:: 4.2
This field has been renamed from ``page_revision`` to ``revision``.
.. attribute:: task
(foreign key to :class:`~wagtail.models.Task`)

Wyświetl plik

@ -88,10 +88,6 @@ Here are some built-in panel types that you can use in your panel definitions. T
(multiple_chooser_panel)=
### MultipleChooserPanel
```{versionadded} 4.2
The `MultipleChooserPanel` panel type was added.
```
````{class} MultipleChooserPanel(relation_name, chooser_field_name=None, panels=None, label='', min_num=None, max_num=None, **kwargs)
This is a variant of `InlinePanel` that improves the editing experience when the main feature of the child panel is a chooser for a `ForeignKey` relation (usually to an image, document, snippet or another page). Rather than the "Add" button inserting a new form to be filled in individually, it immediately opens up the chooser interface for that related object, in a mode that allows multiple items to be selected. The user is then returned to the main edit form with the appropriate number of child panels added and pre-filled.

Wyświetl plik

@ -261,10 +261,6 @@ The interval (in milliseconds) to check for changes made in the page editor befo
`WAGTAILADMIN_GLOBAL_EDIT_LOCK` can be set to `True` to prevent users from editing pages and snippets that they have locked.
```{versionchanged} 4.2
This setting was previously named ``WAGTAILADMIN_GLOBAL_PAGE_EDIT_LOCK``, using ``WAGTAILADMIN_GLOBAL_PAGE_EDIT_LOCK`` will be removed in a future release.
```
(wagtailadmin_unsafe_page_deletion_limit)=
### `WAGTAILADMIN_UNSAFE_PAGE_DELETION_LIMIT`

Wyświetl plik

@ -399,10 +399,6 @@ You can publish revisions programmatically by calling {meth}`instance.publish(re
If you use the scheduled publishing feature, make sure that you run the [`publish_scheduled`](publish_scheduled) management command periodically. For more details, see [](scheduled_publishing).
```{versionadded} 4.2
For models that extend `DraftStateMixin`, `publish` permissions are automatically created.
```
Publishing a snippet instance requires `publish` permission on the snippet model. For models with `DraftStateMixin` applied, Wagtail automatically creates the corresponding `publish` permissions and display them in the 'Groups' area of the Wagtail admin interface. For more details on how to configure the permission, see [](permissions_overview).
```{warning}
@ -413,10 +409,6 @@ Wagtail does not yet have a mechanism to prevent editors from including unpublis
## Locking snippets
```{versionadded} 4.2
The `LockableMixin` class was introduced.
```
If a snippet model inherits from {class}`~wagtail.models.LockableMixin`, Wagtail will automatically add the ability to lock instances of the model. When editing, Wagtail will show the locking information in the "Status" side panel, and a button to lock/unlock the instance if the user has the permission to do so.
If the model is also configured to have scheduled publishing (as shown in [](wagtailsnippets_saving_draft_changes_of_snippets) above), Wagtail will lock any instances that are scheduled for publishing.
@ -453,10 +445,6 @@ Locking and unlocking a snippet instance requires `lock` and `unlock` permission
## Enabling workflows for snippets
```{versionadded} 4.2
The `WorkflowMixin` class was introduced.
```
If a snippet model inherits from {class}`~wagtail.models.WorkflowMixin`, Wagtail will automatically add the ability to assign a workflow to the model. With a workflow assigned to the snippet model, a "Submit for moderation" and other workflow action menu items will be shown in the editor. The status side panel will also show the information of the current workflow.
Since the `WorkflowMixin` utilises revisions and publishing mechanisms in Wagtail, inheriting from this mixin also requires inheriting from `RevisionMixin` and `DraftStateMixin`. In addition, it is also recommended to enable locking by inheriting from `LockableMixin`, so that the snippet instance can be locked and only editable by reviewers when it is in a workflow. See the above sections for more details.

Wyświetl plik

@ -3680,9 +3680,6 @@ class Task(models.Model):
"""
Returns True if the object should be locked to a given user's edits.
This can be used to prevent editing by non-reviewers.
.. versionchanged:: 4.2
This method has been renamed from ``page_locked_for_user`` to ``locked_for_user``.
"""
if hasattr(self, "page_locked_for_user"):
warnings.warn(