Use intersphinx to link to treebeard docs

pull/12525/head
Sage Abdullah 2024-11-04 14:50:58 +00:00
rodzic da3e0ade37
commit f54b03d595
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: EB1A33CC51CC0217
4 zmienionych plików z 8 dodań i 4 usunięć

Wyświetl plik

@ -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. 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. `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.

Wyświetl plik

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

Wyświetl plik

@ -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. 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} ```{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} ```{eval-rst}

Wyświetl plik

@ -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 such as updating the ``url_path`` value of descendant page to reflect changes
to this page's slug. 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>`_ New pages should generally be saved via the :meth:`~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>`_ or :meth:`~treebeard.mp_tree.MP_Node.add_sibling`
method of an existing page, which will correctly set the ``path`` and ``depth`` method of an existing page, which will correctly set the ``path`` and ``depth``
fields on the new page before saving it. fields on the new page before saving it.