diff options
| author | Carlton Gibson <carlton.gibson@noumenal.es> | 2025-03-22 14:27:36 +0100 |
|---|---|---|
| committer | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2025-03-27 17:35:12 +0100 |
| commit | 6e54e20cc3908d4eb103678db14e1e02e05069dd (patch) | |
| tree | 7f4eec4ce062c0154bb54ca4f9f50999d7b98348 /docs | |
| parent | 849f8307a5bb33465252d0891a9b2c47dde65889 (diff) | |
Doc'd how to use Intersphinx in the reusable apps tutorial.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/intro/reusable-apps.txt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/intro/reusable-apps.txt b/docs/intro/reusable-apps.txt index 8c12a36284..f097880f79 100644 --- a/docs/intro/reusable-apps.txt +++ b/docs/intro/reusable-apps.txt @@ -262,6 +262,26 @@ this. For a small app like polls, this process isn't too difficult. you add some files to it. Many Django apps also provide their documentation online through sites like `readthedocs.org <https://readthedocs.org>`_. + Many Python projects, including Django and Python itself, use `Sphinx + <https://www.sphinx-doc.org/en/master/usage/quickstart.html>`_ to build + their documentation. If you choose to use Sphinx you can link back to the + Django documentation by configuring `Intersphinx + <https://www.sphinx-doc.org/en/master/usage/quickstart.html#intersphinx>`_ + and including a value for Django in your project's ``intersphinx_mapping`` + value:: + + intersphinx_mapping = { + # ... + "django": ( + "https://docs.djangoproject.com/en/stable/", + "https://docs.djangoproject.com/en/stable/_objects/", + ), + } + + With that in place, you can then cross-link to specific entries, in the + same way as in the Django docs, such as + "``:attr:`django.test.TransactionTestCase.databases```". + #. Check that the :pypi:`build` package is installed (``python -m pip install build``) and try building your package by running ``python -m build`` inside ``django-polls``. This creates a directory called ``dist`` and builds your |
