瀏覽代碼

Remove old versionadded / versionchanged directives from docs

Matt Westcott 2 年之前
父節點
當前提交
18a574b520

+ 0 - 4
docs/advanced_topics/api/v2/usage.md

@@ -336,10 +336,6 @@ to only include descendants of that page (children, grandchildren etc.).
 
 ### Filtering pages by site
 
-```{versionadded} 4.0
-
-```
-
 By default, the API will look for the site based on the hostname of the request.
 In some cases, you might want to query pages belonging to a different site.
 The `?site=` filter is used to filter the listing to only include pages that

+ 0 - 4
docs/advanced_topics/boundblocks_and_values.md

@@ -110,7 +110,3 @@ In summary, interactions between BoundBlocks and plain values work according to
 3. Accessing a child of a StructBlock (as in `value.heading`) will return a plain value; to retrieve the BoundBlock instead, use `value.bound_blocks.heading`.
 4. Likewise, accessing children of a ListBlock (for example `for item in value`) will return plain values; to retrieve BoundBlocks instead, use `value.bound_blocks`.
 5. StructBlock and StreamBlock values always know how to render their own templates, even if you only have the plain value rather than the BoundBlock.
-
-```{versionchanged} 2.16
-The value of a ListBlock now provides a `bound_blocks` property; previously it was a plain Python list of child values.
-```

+ 0 - 8
docs/advanced_topics/images/renditions.md

@@ -40,10 +40,6 @@ See also: [](image_tag)
 
 When using a queryset to render a list of images or objects with images, you can prefetch the renditions needed with a single additional query. For long lists of items, or where multiple renditions are used for each item, this can provide a significant boost to performance.
 
-```{versionadded} 4.0
-The `prefetch_renditions` method is only applicable in Wagtail versions 4.0 and above.
-```
-
 ### Image QuerySets
 
 When working with an Image QuerySet, you can make use of Wagtail's built-in `prefetch_renditions` queryset method to prefetch the renditions needed.
@@ -115,10 +111,6 @@ def get_events():
 
 ## Model methods involved in rendition generation
 
-```{versionadded} 3.0
-The following method references are only applicable to Wagtail versions 3.0 and above.
-```
-
 The following `AbstractImage` model methods are involved in finding and generating renditions. If using a custom image model, you can customise the behaviour of either of these methods by overriding them on your model:
 
 ```{eval-rst}

+ 0 - 4
docs/extending/audit_log.md

@@ -52,10 +52,6 @@ When adding logging, you need to log the action or actions that happen to the ob
         )
 ```
 
-```{versionchanged} 2.15
-The `log` function was added. Previously, logging was only implemented for pages, and invoked through the `PageLogEntry.objects.log_action` method.
-```
-
 ## Log actions provided by Wagtail
 
 | Action                            | Notes                                                                            |

+ 0 - 4
docs/reference/hooks.md

@@ -1415,10 +1415,6 @@ def additional_log_actions(actions):
             }
 ```
 
-```{versionchanged} 2.15
-The ``LogFormatter`` class was introduced. Previously, dynamic messages were achieved by passing a callable as the ``message`` argument to ``register_action``.
-```
-
 ## Images
 
 (register_image_operations)=

+ 0 - 5
docs/reference/management_commands.md

@@ -6,11 +6,6 @@
 
 ## publish_scheduled
 
-```{versionchanged} 4.1
-This command has been renamed from `publish_scheduled_pages` to `publish_scheduled` and it now also handles non-page objects.
-The `publish_scheduled_pages` command is still available as an alias, but it is recommended to update your configuration to run the `publish_scheduled` command instead.
-```
-
 ```sh
 ./manage.py publish_scheduled
 ```

+ 0 - 18
docs/reference/pages/model_reference.md

@@ -683,10 +683,6 @@ Every time a page is edited, a new `Revision` is created and saved to the databa
 -   The content of the page is JSON-serialisable and stored in the {attr}`~Revision.content` field.
 -   You can retrieve a `Revision` as an instance of the object's model by calling the {meth}`~Revision.as_object` method.
 
-```{versionchanged} 4.0
-The model has been renamed from ``PageRevision`` to ``Revision`` and it now references the ``Page`` model using a {class}`~django.contrib.contenttypes.fields.GenericForeignKey`.
-```
-
 ### Database fields
 
 ```{eval-rst}
@@ -739,11 +735,6 @@ The model has been renamed from ``PageRevision`` to ``Revision`` and it now refe
         (dict)
 
         The JSON content for the object at the time the revision was created.
-
-        .. versionchanged:: 3.0
-
-          The field has been renamed from ``content_json`` to ``content`` and it now uses :class:`~django.db.models.JSONField` instead of
-          :class:`~django.db.models.TextField`.
 ```
 
 ### Managers
@@ -798,10 +789,6 @@ The model has been renamed from ``PageRevision`` to ``Revision`` and it now refe
 
         This method retrieves this revision as an instance of its object's specific class. If the revision belongs to a page, it will be an instance of the :class:`~wagtail.models.Page`'s specific subclass.
 
-        .. versionchanged:: 4.0
-
-            This method has been renamed from ``as_page_object()`` to ``as_object()``.
-
     .. automethod:: approve_moderation
 
         Calling this on a revision that's in moderation will mark it as approved and publish it.
@@ -1279,11 +1266,6 @@ An abstract base class that represents a record of an action performed on an obj
         The JSON representation of any additional details for each action.
         For example source page id and title when copying from a page. Or workflow id/name and next step id/name on a workflow transition
 
-        .. versionchanged:: 3.0
-
-          The field has been renamed from ``data_json`` to ``data`` and it now uses :class:`~django.db.models.JSONField` instead of
-          :class:`~django.db.models.TextField`.
-
     .. attribute:: timestamp
 
         (date/time)

+ 0 - 21
docs/reference/pages/panels.md

@@ -54,18 +54,6 @@ Here are some Wagtail-specific types that you might include as fields in your mo
         Allows a field to be selectively shown to users with sufficient permission. Accepts a permission codename such as ``'myapp.change_blog_category'`` - if the logged-in user does not have that permission, the field will be omitted from the form. See Django's documentation on :ref:`custom permissions <django:custom-permissions>` for details on how to set permissions up; alternatively, if you want to set a field as only available to superusers, you can use any arbitrary string (such as ``'superuser'``) as the codename, since superusers automatically pass all permission tests.
 ```
 
-### StreamFieldPanel
-
-```{eval-rst}
-.. class:: StreamFieldPanel(field_name, classname=None, widget=None)
-
-    Deprecated; use ``FieldPanel`` instead.
-
-    .. versionchanged:: 3.0
-
-       ``StreamFieldPanel`` is no longer required for ``StreamField``.
-```
-
 ### MultiFieldPanel
 
 ```{eval-rst}
@@ -188,11 +176,6 @@ Note that you can use `classname="collapsed"` to load the panel collapsed under
 
     Passing ``can_choose_root=True`` will allow the editor to choose the tree root as a page. Normally this would be undesirable, since the tree root is never a usable page, but in some specialised cases it may be appropriate; for example, a page with an automatic "related articles" feed could use a PageChooserPanel to select which subsection articles will be taken from, with the root corresponding to 'everywhere'.
 
-    .. versionchanged:: 3.0
-
-       ``FieldPanel`` now also provides a page chooser interface for foreign keys to page models. ``PageChooserPanel`` is only required when specifying the ``page_type`` or ``can_choose_root`` parameters.
-```
-
 ### FormSubmissionsPanel
 
 ```{eval-rst}
@@ -227,10 +210,6 @@ Use `classname="title"` to make Page's built-in title field stand out with more
 
 ### Collapsible
 
-```{versionchanged} 4.0
-All panels are now collapsible by default.
-```
-
 Using `classname="collapsed"` will load the editor page with the panel collapsed under its heading.
 
 ```python

+ 0 - 4
docs/topics/pages.md

@@ -132,10 +132,6 @@ These allow editing of model fields. The `FieldPanel` class will choose the corr
 -   {class}`~wagtail.admin.panels.FieldPanel`
 -   {class}`~wagtail.admin.panels.PageChooserPanel`
 
-```{versionchanged} 3.0
-Previously, certain field types required special-purpose panels: `StreamFieldPanel`, `ImageChooserPanel`, `DocumentChooserPanel` and `SnippetChooserPanel`. These are now all handled by `FieldPanel`.
-```
-
 **Structural**
 
 These are used for structuring fields in the interface.

+ 0 - 4
docs/topics/search/searching.md

@@ -192,10 +192,6 @@ If you are looking to implement phrase queries using the double-quote syntax, se
 
 ### Fuzzy matching
 
-```{versionadded} 4.0
-
-```
-
 Fuzzy matching will return documents which contain terms similar to the search term, as measured by a [Levenshtein edit distance](https://en.wikipedia.org/wiki/Levenshtein_distance).
 
 A maximum of one edit (transposition, insertion, or removal of a character) is permitted for three to five letter terms, two edits for longer terms, and shorter terms must match exactly.

+ 0 - 16
docs/topics/snippets.md

@@ -164,10 +164,6 @@ These child objects are now accessible through the page's `advert_placements` pr
 
 ## Making snippets previewable
 
-```{versionadded} 4.0
-The `PreviewableMixin` class was introduced.
-```
-
 If a snippet model inherits from {class}`~wagtail.models.PreviewableMixin`, Wagtail will automatically add a live preview panel in the editor. In addition to inheriting the mixin, the model must also override {meth}`~wagtail.models.PreviewableMixin.get_preview_template` or {meth}`~wagtail.models.PreviewableMixin.serve_preview`. For example, the `Advert` snippet could be made previewable as follows:
 
 ```python
@@ -278,10 +274,6 @@ class Advert(index.Indexed, models.Model):
 
 ## Saving revisions of snippets
 
-```{versionadded} 4.0
-The `RevisionMixin` class was introduced.
-```
-
 If a snippet model inherits from {class}`~wagtail.models.RevisionMixin`, Wagtail will automatically save revisions when you save any changes in the snippets admin.
 In addition to inheriting the mixin, it is recommended to define a {class}`~django.contrib.contenttypes.fields.GenericRelation` to the {class}`~wagtail.models.Revision` model and override the {attr}`~wagtail.models.RevisionMixin.revisions` property to return the `GenericRelation`. For example, the `Advert` snippet could be made revisable as follows:
 
@@ -358,14 +350,6 @@ You can also save revisions programmatically by calling the {meth}`~wagtail.mode
 
 ## Saving draft changes of snippets
 
-```{versionadded} 4.0
-The `DraftStateMixin` class was introduced.
-```
-
-```{versionadded} 4.1
-Support for scheduled publishing via `PublishingPanel` was introduced.
-```
-
 If a snippet model inherits from {class}`~wagtail.models.DraftStateMixin`, Wagtail will automatically add a live/draft status column to the listing view, change the "Save" action menu to "Save draft", and add a new "Publish" action menu in the editor. Any changes you save in the snippets admin will be saved as revisions and will not be reflected in the "live" snippet instance until you publish the changes.
 
 As the `DraftStateMixin` works by saving draft changes as revisions, inheriting from this mixin also requires inheriting from `RevisionMixin`. See [](wagtailsnippets_saving_revisions_of_snippets) above for more details.

+ 0 - 4
docs/topics/streamfield.md

@@ -523,10 +523,6 @@ my_page.save()
 
 ## Retrieving blocks by name
 
-```{versionadded} 4.0
-The `blocks_by_name` and `first_block_by_name` methods were added.
-```
-
 StreamField values provide a `blocks_by_name` method for retrieving all blocks of a given name:
 
 ```python

+ 0 - 4
wagtail/models/__init__.py

@@ -2022,8 +2022,6 @@ class Page(AbstractPage, index.Indexed, ClusterableModel, metaclass=PageBase):
 
     def _get_relevant_site_root_paths(self, cache_object=None):
         """
-        .. versionadded::2.16
-
         Returns a tuple of root paths for all sites this page belongs to.
         """
         return tuple(
@@ -2479,8 +2477,6 @@ class Page(AbstractPage, index.Indexed, ClusterableModel, metaclass=PageBase):
 
     def get_route_paths(self):
         """
-        .. versionadded:: 2.16
-
         Returns a list of paths that this page can be viewed at.
 
         These values are combined with the dynamic portion of the page URL to