0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-21 18:09:02 +01:00

Use intersphinx to link to treebeard docs

This commit is contained in:
Sage Abdullah 2024-11-04 14:50:58 +00:00
parent da3e0ade37
commit f54b03d595
No known key found for this signature in database
GPG Key ID: EB1A33CC51CC0217
4 changed files with 8 additions and 4 deletions

View File

@ -329,4 +329,4 @@ You could create such a homepage in a fixture with:
Filling in the `path` / `numchild` / `depth` fields is necessary for tree operations like `get_parent()` to work correctly.
`url_path` is another field that can cause errors in some uncommon cases if it isn't filled in.
The [Treebeard docs](https://django-treebeard.readthedocs.io/en/latest/mp_tree.html) might help in understanding how this works.
The [Treebeard docs](inv:treebeard:std:doc#mp_tree) might help in understanding how this works.

View File

@ -173,6 +173,10 @@ intersphinx_mapping = {
"https://docs.python.org/3/",
None,
),
"treebeard": (
"https://django-treebeard.readthedocs.io/en/stable/",
None,
),
"sphinx": (
"https://www.sphinx-doc.org/en/master/",
None,

View File

@ -151,7 +151,7 @@ This document contains reference information for the model classes inside the `w
In addition to the model fields provided, `Page` has many properties and methods that you may wish to reference, use, or override in creating your own models.
```{note}
See also [django-treebeard](https://django-treebeard.readthedocs.io/en/latest/index.html)'s [node API](https://django-treebeard.readthedocs.io/en/latest/api.html). ``Page`` is a subclass of [materialized path tree](https://django-treebeard.readthedocs.io/en/latest/mp_tree.html) nodes.
See also [django-treebeard](inv:treebeard:std:doc#index)'s [node API](inv:treebeard:std:doc#api). ``Page`` is a subclass of [materialized path tree](inv:treebeard:std:doc#mp_tree) nodes.
```
```{eval-rst}

View File

@ -1590,8 +1590,8 @@ class Page(AbstractPage, index.Indexed, ClusterableModel, metaclass=PageBase):
such as updating the ``url_path`` value of descendant page to reflect changes
to this page's slug.
New pages should generally be saved via the `add_child() <https://django-treebeard.readthedocs.io/en/latest/mp_tree.html#treebeard.mp_tree.MP_Node.add_child>`_
or `add_sibling() <https://django-treebeard.readthedocs.io/en/latest/mp_tree.html#treebeard.mp_tree.MP_Node.add_sibling>`_
New pages should generally be saved via the :meth:`~treebeard.mp_tree.MP_Node.add_child`
or :meth:`~treebeard.mp_tree.MP_Node.add_sibling`
method of an existing page, which will correctly set the ``path`` and ``depth``
fields on the new page before saving it.