diff options
| author | Tim Graham <timograham@gmail.com> | 2023-04-16 19:14:09 -0400 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-04-17 07:44:29 +0200 |
| commit | 26f181939ebdad3811736aadeb5634bbdcaca025 (patch) | |
| tree | 5f18511a1bb833a58b49660035b8bc800ffe9b89 /docs/topics | |
| parent | 509401313471ac0e9ef2e0c575c02db4436d6158 (diff) | |
[4.2.x] Used extlinks for PyPI links.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Backport of 2c4dc6476083c853b654e462c7ff65dbe0334c9e from main
Diffstat (limited to 'docs/topics')
| -rw-r--r-- | docs/topics/async.txt | 4 | ||||
| -rw-r--r-- | docs/topics/auth/default.txt | 3 | ||||
| -rw-r--r-- | docs/topics/auth/passwords.txt | 6 | ||||
| -rw-r--r-- | docs/topics/cache.txt | 12 | ||||
| -rw-r--r-- | docs/topics/external-packages.txt | 6 | ||||
| -rw-r--r-- | docs/topics/i18n/translation.txt | 3 | ||||
| -rw-r--r-- | docs/topics/testing/advanced.txt | 3 | ||||
| -rw-r--r-- | docs/topics/testing/tools.txt | 4 |
8 files changed, 13 insertions, 28 deletions
diff --git a/docs/topics/async.txt b/docs/topics/async.txt index 65138eb2b5..c8a68b47d6 100644 --- a/docs/topics/async.txt +++ b/docs/topics/async.txt @@ -214,12 +214,10 @@ context, or vice-versa. For this there are two adapter functions, from the are used to transition between the calling styles while preserving compatibility. -These adapter functions are widely used in Django. The `asgiref`_ package +These adapter functions are widely used in Django. The :pypi:`asgiref` package itself is part of the Django project, and it is automatically installed as a dependency when you install Django with ``pip``. -.. _asgiref: https://pypi.org/project/asgiref/ - ``async_to_sync()`` ------------------- diff --git a/docs/topics/auth/default.txt b/docs/topics/auth/default.txt index a6a074836f..528902416d 100644 --- a/docs/topics/auth/default.txt +++ b/docs/topics/auth/default.txt @@ -1346,8 +1346,7 @@ implementation details see :ref:`using-the-views`. difference between the duration of a reset request for an existing email address and the duration of a reset request for a nonexistent email address. To reduce the overhead, you can use a 3rd party package - that allows to send emails asynchronously, e.g. `django-mailer - <https://pypi.org/project/django-mailer/>`_. + that allows to send emails asynchronously, e.g. :pypi:`django-mailer`. **Attributes:** diff --git a/docs/topics/auth/passwords.txt b/docs/topics/auth/passwords.txt index 07e2163fc2..695c8d2571 100644 --- a/docs/topics/auth/passwords.txt +++ b/docs/topics/auth/passwords.txt @@ -94,7 +94,7 @@ use of Argon2 rather than the other algorithms supported by Django. To use Argon2id as your default storage algorithm, do the following: -#. Install the `argon2-cffi library`_. This can be done by running +#. Install the :pypi:`argon2-cffi` package. This can be done by running ``python -m pip install django[argon2]``, which is equivalent to ``python -m pip install argon2-cffi`` (along with any version requirement from Django's ``setup.cfg``). @@ -125,7 +125,7 @@ use it Django supports bcrypt with minimal effort. To use Bcrypt as your default storage algorithm, do the following: -#. Install the `bcrypt library`_. This can be done by running +#. Install the :pypi:`bcrypt` package. This can be done by running ``python -m pip install django[bcrypt]``, which is equivalent to ``python -m pip install bcrypt`` (along with any version requirement from Django's ``setup.cfg``). @@ -416,8 +416,6 @@ Include any other hashers that your site uses in this list. .. _pbkdf2: https://en.wikipedia.org/wiki/PBKDF2 .. _nist: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf .. _bcrypt: https://en.wikipedia.org/wiki/Bcrypt -.. _`bcrypt library`: https://pypi.org/project/bcrypt/ -.. _`argon2-cffi library`: https://pypi.org/project/argon2-cffi/ .. _argon2: https://en.wikipedia.org/wiki/Argon2 .. _scrypt: https://en.wikipedia.org/wiki/Scrypt .. _`Password Hashing Competition`: https://www.password-hashing.net/ diff --git a/docs/topics/cache.txt b/docs/topics/cache.txt index 06e152ff01..3c3aba898d 100644 --- a/docs/topics/cache.txt +++ b/docs/topics/cache.txt @@ -78,10 +78,7 @@ database or filesystem usage. After installing Memcached itself, you'll need to install a Memcached binding. There are several Python Memcached bindings available; the -two supported by Django are `pylibmc`_ and `pymemcache`_. - -.. _`pylibmc`: https://pypi.org/project/pylibmc/ -.. _`pymemcache`: https://pypi.org/project/pymemcache/ +two supported by Django are :pypi:`pylibmc` and :pypi:`pymemcache`. To use Memcached with Django: @@ -180,11 +177,8 @@ need a Redis server running either locally or on a remote machine. __ https://redis.io/ After setting up the Redis server, you'll need to install Python bindings for -Redis. `redis-py`_ is the binding supported natively by Django. Installing the -additional `hiredis-py`_ package is also recommended. - -.. _`redis-py`: https://pypi.org/project/redis/ -.. _`hiredis-py`: https://pypi.org/project/hiredis/ +Redis. :pypi:`redis-py <redis>` is the binding supported natively by Django. +Installing the :pypi:`hiredis-py <hiredis>` package is also recommended. To use Redis as your cache backend with Django: diff --git a/docs/topics/external-packages.txt b/docs/topics/external-packages.txt index ffc5552aec..4dc863ba1c 100644 --- a/docs/topics/external-packages.txt +++ b/docs/topics/external-packages.txt @@ -14,7 +14,7 @@ and cultures. * `GitHub <https://github.com/django/django-localflavor>`__ * `Documentation <https://django-localflavor.readthedocs.io/>`__ -* `PyPI <https://pypi.org/project/django-localflavor/>`__ +* :pypi:`PyPI <django-localflavor>` Comments ======== @@ -26,7 +26,7 @@ product like Disqus. * `GitHub <https://github.com/django/django-contrib-comments>`__ * `Documentation <https://django-contrib-comments.readthedocs.io/>`__ -* `PyPI <https://pypi.org/project/django-contrib-comments/>`__ +* :pypi:`PyPI <django-contrib-comments>` Formtools ========= @@ -35,4 +35,4 @@ Formtools * `GitHub <https://github.com/jazzband/django-formtools/>`__ * `Documentation <https://django-formtools.readthedocs.io/>`__ -* `PyPI <https://pypi.org/project/django-formtools/>`__ +* :pypi:`PyPI <django-formtools>` diff --git a/docs/topics/i18n/translation.txt b/docs/topics/i18n/translation.txt index 555d4cf70a..6fe126f59d 100644 --- a/docs/topics/i18n/translation.txt +++ b/docs/topics/i18n/translation.txt @@ -415,8 +415,7 @@ Working with lazy translation objects The result of a ``gettext_lazy()`` call can be used wherever you would use a string (a :class:`str` object) in other Django code, but it may not work with arbitrary Python code. For example, the following won't work because the -`requests <https://pypi.org/project/requests/>`_ library doesn't handle -``gettext_lazy`` objects:: +:pypi:`requests` library doesn't handle ``gettext_lazy`` objects:: body = gettext_lazy("I \u2764 Django") # (Unicode :heart:) requests.post("https://example.com/send", data={"body": body}) diff --git a/docs/topics/testing/advanced.txt b/docs/topics/testing/advanced.txt index 65ca20dad8..26de48497b 100644 --- a/docs/topics/testing/advanced.txt +++ b/docs/topics/testing/advanced.txt @@ -873,7 +873,7 @@ important part of testing applications, so it's strongly recommended to check the coverage of your tests. Django can be easily integrated with `coverage.py`_, a tool for measuring code -coverage of Python programs. First, `install coverage.py`_. Next, run the +coverage of Python programs. First, install :pypi:`coverage`. Next, run the following from your project folder containing ``manage.py``: .. code-block:: shell @@ -894,4 +894,3 @@ For more options like annotated HTML listings detailing missed lines, see the `coverage.py`_ docs. .. _coverage.py: https://coverage.readthedocs.io/ -.. _install coverage.py: https://pypi.org/project/coverage/ diff --git a/docs/topics/testing/tools.txt b/docs/topics/testing/tools.txt index efdb54d939..f1bf71809e 100644 --- a/docs/topics/testing/tools.txt +++ b/docs/topics/testing/tools.txt @@ -1031,8 +1031,7 @@ port assigned by the operating system. The server's URL can be accessed with ``self.live_server_url`` during the tests. To demonstrate how to use ``LiveServerTestCase``, let's write a Selenium test. -First of all, you need to install the `selenium package`_ into your Python -path: +First of all, you need to install the :pypi:`selenium` package: .. console:: @@ -1090,7 +1089,6 @@ example above is just a tiny fraction of what the Selenium client can do; check out the `full reference`_ for more details. .. _Selenium: https://www.selenium.dev/ -.. _selenium package: https://pypi.org/project/selenium/ .. _full reference: https://selenium-python.readthedocs.io/api.html .. _Firefox: https://www.mozilla.com/firefox/ |
