From a19bae886df1e9ce8b9339e57f432b5a21fa592a Mon Sep 17 00:00:00 2001 From: LB Johnston Date: Thu, 31 Aug 2023 08:02:29 +1000 Subject: [PATCH] Format markdown files --- .../contrib/modeladmin/migrating_to_snippets.md | 16 ++++++++-------- docs/releases/upgrading.md | 2 +- docs/topics/streamfield.md | 1 - 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/docs/reference/contrib/modeladmin/migrating_to_snippets.md b/docs/reference/contrib/modeladmin/migrating_to_snippets.md index f5a0cf85e9..4334536346 100644 --- a/docs/reference/contrib/modeladmin/migrating_to_snippets.md +++ b/docs/reference/contrib/modeladmin/migrating_to_snippets.md @@ -44,14 +44,14 @@ Change any references to `ModelAdmin` and `modeladmin_register` to `SnippetViewS There are a few attributes of `ModelAdmin` that need to be renamed/adjusted for `SnippetViewSet`. The following is a table of such attributes and the changes that need to be made: -| `ModelAdmin` attribute | `SnippetViewSet` attribute | Notes | -| ---------------------- | -------------------------- | ----- | -| `add_to_admin_menu` | {attr}`~wagtail.admin.viewsets.base.ViewSet.add_to_admin_menu` | Same attribute name, but the value defaults to `False` instead of `True`. Set to `True` to add a top-level menu item for the model. | -| `menu_icon` | {attr}`~wagtail.admin.viewsets.base.ViewSet.icon` | Same value, but different attribute name, as the icon is used throughout the admin and not just in the menu. | -| `list_display` | {attr}`~wagtail.admin.viewsets.model.ModelViewSet.list_display` | Same attribute name, but the list/tuple of strings must refer to existing attributes or methods on the model, not the `SnippetViewSet` class. If you have specified a string that refers to an attribute or method on the `ModelAdmin` class, you need to move it to the model. In addition, `list_display` now also supports instances of the `wagtail.admin.ui.tables.Column` component class. | -| `list_filter` | {attr}`~wagtail.admin.viewsets.model.ModelViewSet.list_filter` | Same attribute name and value, but filtering is built on top of the django-filter package under the hood, which behaves differently to ModelAdmin's filters. See documentation for `SnippetViewSet.list_filter` and {attr}`~SnippetViewSet.filterset_class` for more details. | -| `form_fields_exclude` | {attr}`~wagtail.admin.viewsets.model.ModelViewSet.exclude_form_fields` | Same value, but different attribute name to better align with `ModelViewSet`. | -| - | {attr}`~wagtail.admin.viewsets.model.ModelViewSet.template_prefix` | New attribute. Set to the name of a template directory to override the `"wagtailsnippets/snippets/"` default. If set to `"modeladmin/"`, the template directory structure will be equal to what ModelAdmin uses. Make sure any custom templates are placed in the correct directory according to this prefix. See [](wagtailsnippets_templates) for more details. | +| `ModelAdmin` attribute | `SnippetViewSet` attribute | Notes | +| ---------------------- | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `add_to_admin_menu` | {attr}`~wagtail.admin.viewsets.base.ViewSet.add_to_admin_menu` | Same attribute name, but the value defaults to `False` instead of `True`. Set to `True` to add a top-level menu item for the model. | +| `menu_icon` | {attr}`~wagtail.admin.viewsets.base.ViewSet.icon` | Same value, but different attribute name, as the icon is used throughout the admin and not just in the menu. | +| `list_display` | {attr}`~wagtail.admin.viewsets.model.ModelViewSet.list_display` | Same attribute name, but the list/tuple of strings must refer to existing attributes or methods on the model, not the `SnippetViewSet` class. If you have specified a string that refers to an attribute or method on the `ModelAdmin` class, you need to move it to the model. In addition, `list_display` now also supports instances of the `wagtail.admin.ui.tables.Column` component class. | +| `list_filter` | {attr}`~wagtail.admin.viewsets.model.ModelViewSet.list_filter` | Same attribute name and value, but filtering is built on top of the django-filter package under the hood, which behaves differently to ModelAdmin's filters. See documentation for `SnippetViewSet.list_filter` and {attr}`~SnippetViewSet.filterset_class` for more details. | +| `form_fields_exclude` | {attr}`~wagtail.admin.viewsets.model.ModelViewSet.exclude_form_fields` | Same value, but different attribute name to better align with `ModelViewSet`. | +| - | {attr}`~wagtail.admin.viewsets.model.ModelViewSet.template_prefix` | New attribute. Set to the name of a template directory to override the `"wagtailsnippets/snippets/"` default. If set to `"modeladmin/"`, the template directory structure will be equal to what ModelAdmin uses. Make sure any custom templates are placed in the correct directory according to this prefix. See [](wagtailsnippets_templates) for more details. | ### Boolean properties in `list_display` diff --git a/docs/releases/upgrading.md b/docs/releases/upgrading.md index 7331328a9d..223384f1b4 100644 --- a/docs/releases/upgrading.md +++ b/docs/releases/upgrading.md @@ -58,7 +58,7 @@ New feature releases frequently add support for newer versions of Django and Pyt The compatible versions of Django and Python for each Wagtail release are: | Wagtail release | Compatible Django versions | Compatible Python versions | -| --------------- | -------------------------- |----------------------------| +| --------------- | -------------------------- | -------------------------- | | 5.2 | 3.2, 4.1, 4.2 | 3.8, 3.9, 3.10, 3.11 | | 5.1 | 3.2, 4.1, 4.2 | 3.8, 3.9, 3.10, 3.11 | | 5.0 | 3.2, 4.1, 4.2 | 3.7, 3.8, 3.9, 3.10, 3.11 | diff --git a/docs/topics/streamfield.md b/docs/topics/streamfield.md index 2284b00c0f..6a35cd8a05 100644 --- a/docs/topics/streamfield.md +++ b/docs/topics/streamfield.md @@ -49,7 +49,6 @@ You can find the complete list of available block types in the [](streamfield_bl While block definitions look similar to model fields, they are not the same thing. Blocks are only valid within a StreamField - using them in place of a model field will not work. ``` - (streamfield_template_rendering)= ## Template rendering