mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
[4.2.x] Used extlinks for PyPI links.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Backport of 2c4dc64760 from main
This commit is contained in:
committed by
Mariusz Felisiak
parent
5094013134
commit
26f181939e
@@ -45,12 +45,12 @@ Python style
|
||||
|
||||
* Unless otherwise specified, follow :pep:`8`.
|
||||
|
||||
Use `flake8`_ to check for problems in this area. Note that our ``setup.cfg``
|
||||
file contains some excluded files (deprecated modules we don't care about
|
||||
cleaning up and some third-party code that Django vendors) as well as some
|
||||
excluded errors that we don't consider as gross violations. Remember that
|
||||
:pep:`8` is only a guide, so respect the style of the surrounding code as a
|
||||
primary goal.
|
||||
Use :pypi:`flake8` to check for problems in this area. Note that our
|
||||
``setup.cfg`` file contains some excluded files (deprecated modules we don't
|
||||
care about cleaning up and some third-party code that Django vendors) as well
|
||||
as some excluded errors that we don't consider as gross violations. Remember
|
||||
that :pep:`8` is only a guide, so respect the style of the surrounding code
|
||||
as a primary goal.
|
||||
|
||||
An exception to :pep:`8` is our rules on line lengths. Don't limit lines of
|
||||
code to 79 characters if it means the code looks significantly uglier or is
|
||||
@@ -352,8 +352,8 @@ Miscellaneous
|
||||
documentation </topics/i18n/index>` for details.
|
||||
|
||||
* Remove ``import`` statements that are no longer used when you change code.
|
||||
`flake8`_ will identify these imports for you. If an unused import needs to
|
||||
remain for backwards-compatibility, mark the end of with ``# NOQA`` to
|
||||
:pypi:`flake8` will identify these imports for you. If an unused import needs
|
||||
to remain for backwards-compatibility, mark the end of with ``# NOQA`` to
|
||||
silence the flake8 warning.
|
||||
|
||||
* Systematically remove all trailing whitespaces from your code as those
|
||||
@@ -376,4 +376,3 @@ For details about the JavaScript code style used by Django, see
|
||||
|
||||
.. _black: https://black.readthedocs.io/en/stable/
|
||||
.. _editorconfig: https://editorconfig.org/
|
||||
.. _flake8: https://pypi.org/project/flake8/
|
||||
|
||||
@@ -251,7 +251,7 @@ Running the Selenium tests
|
||||
--------------------------
|
||||
|
||||
Some tests require Selenium and a web browser. To run these tests, you must
|
||||
install the selenium_ package and run the tests with the
|
||||
install the :pypi:`selenium` package and run the tests with the
|
||||
``--selenium=<BROWSERS>`` option. For example, if you have Firefox and Google
|
||||
Chrome installed:
|
||||
|
||||
@@ -277,28 +277,31 @@ Running all the tests
|
||||
If you want to run the full suite of tests, you'll need to install a number of
|
||||
dependencies:
|
||||
|
||||
* aiosmtpd_
|
||||
* argon2-cffi_ 19.2.0+
|
||||
* asgiref_ 3.6.0+ (required)
|
||||
* bcrypt_
|
||||
* colorama_
|
||||
* docutils_
|
||||
* geoip2_
|
||||
* jinja2_ 2.11+
|
||||
* numpy_
|
||||
* Pillow_ 6.2.1+
|
||||
* PyYAML_
|
||||
* pytz_ (required)
|
||||
* pywatchman_
|
||||
* redis_ 3.4+
|
||||
* setuptools_
|
||||
* memcached_, plus a :ref:`supported Python binding <memcached>`
|
||||
* gettext_ (:ref:`gettext_on_windows`)
|
||||
* selenium_
|
||||
* sqlparse_ 0.3.1+ (required)
|
||||
* tblib_ 1.5.0+
|
||||
* :pypi:`aiosmtpd`
|
||||
* :pypi:`argon2-cffi` 19.2.0+
|
||||
* :pypi:`asgiref` 3.6.0+ (required)
|
||||
* :pypi:`bcrypt`
|
||||
* :pypi:`colorama`
|
||||
* :pypi:`docutils`
|
||||
* :pypi:`geoip2`
|
||||
* :pypi:`Jinja2` 2.11+
|
||||
* :pypi:`numpy`
|
||||
* :pypi:`Pillow` 6.2.1+
|
||||
* :pypi:`PyYAML`
|
||||
* :pypi:`pytz` (required)
|
||||
* :pypi:`pywatchman`
|
||||
* :pypi:`redis` 3.4+
|
||||
* :pypi:`setuptools`
|
||||
* :pypi:`memcached`, plus a `supported Python binding
|
||||
<https://memcached.org/>`_
|
||||
* `gettext <https://www.gnu.org/software/gettext/manual/gettext.html>`_
|
||||
(:ref:`gettext_on_windows`)
|
||||
* :pypi:`selenium`
|
||||
* :pypi:`sqlparse` 0.3.1+ (required)
|
||||
* :pypi:`tblib` 1.5.0+
|
||||
|
||||
You can find these dependencies in `pip requirements files`_ inside the
|
||||
You can find these dependencies in `pip requirements files
|
||||
<https://pip.pypa.io/en/latest/user_guide/#requirements-files>`_ inside the
|
||||
``tests/requirements`` directory of the Django source tree and install them
|
||||
like so:
|
||||
|
||||
@@ -324,31 +327,8 @@ and install the Geospatial libraries</ref/contrib/gis/install/index>`.
|
||||
Each of these dependencies is optional. If you're missing any of them, the
|
||||
associated tests will be skipped.
|
||||
|
||||
To run some of the autoreload tests, you'll need to install the Watchman_
|
||||
service.
|
||||
|
||||
.. _aiosmtpd: https://pypi.org/project/aiosmtpd/
|
||||
.. _argon2-cffi: https://pypi.org/project/argon2-cffi/
|
||||
.. _asgiref: https://pypi.org/project/asgiref/
|
||||
.. _bcrypt: https://pypi.org/project/bcrypt/
|
||||
.. _colorama: https://pypi.org/project/colorama/
|
||||
.. _docutils: https://pypi.org/project/docutils/
|
||||
.. _geoip2: https://pypi.org/project/geoip2/
|
||||
.. _jinja2: https://pypi.org/project/Jinja2/
|
||||
.. _numpy: https://pypi.org/project/numpy/
|
||||
.. _Pillow: https://pypi.org/project/Pillow/
|
||||
.. _PyYAML: https://pyyaml.org/wiki/PyYAML
|
||||
.. _pytz: https://pypi.org/project/pytz/
|
||||
.. _pywatchman: https://pypi.org/project/pywatchman/
|
||||
.. _redis: https://pypi.org/project/redis/
|
||||
.. _setuptools: https://pypi.org/project/setuptools/
|
||||
.. _memcached: https://memcached.org/
|
||||
.. _gettext: https://www.gnu.org/software/gettext/manual/gettext.html
|
||||
.. _selenium: https://pypi.org/project/selenium/
|
||||
.. _sqlparse: https://pypi.org/project/sqlparse/
|
||||
.. _pip requirements files: https://pip.pypa.io/en/latest/user_guide/#requirements-files
|
||||
.. _tblib: https://pypi.org/project/tblib/
|
||||
.. _Watchman: https://facebook.github.io/watchman/
|
||||
To run some of the autoreload tests, you'll need to install the
|
||||
`Watchman <https://facebook.github.io/watchman/>`_ service.
|
||||
|
||||
Code coverage
|
||||
-------------
|
||||
|
||||
@@ -211,7 +211,7 @@ documentation:
|
||||
"last bit" of that path. So ``:mod:`~django.contrib.auth``` will
|
||||
display a link with the title "auth".
|
||||
|
||||
* All Python code blocks should be formatted using the `blacken-docs`_
|
||||
* All Python code blocks should be formatted using the :pypi:`blacken-docs`
|
||||
auto-formatter. This will be run by ``pre-commit`` if that is configured.
|
||||
|
||||
* Use :mod:`~sphinx.ext.intersphinx` to reference Python's and Sphinx'
|
||||
@@ -264,9 +264,7 @@ documentation:
|
||||
.. versionchanged:: 4.2
|
||||
|
||||
All Python code blocks in the Django documentation were reformatted with
|
||||
`blacken-docs`_.
|
||||
|
||||
.. _blacken-docs: https://pypi.org/project/blacken-docs/
|
||||
:pypi:`blacken-docs`.
|
||||
|
||||
Django-specific markup
|
||||
======================
|
||||
@@ -536,8 +534,7 @@ Spelling check
|
||||
==============
|
||||
|
||||
Before you commit your docs, it's a good idea to run the spelling checker.
|
||||
You'll need to install `sphinxcontrib-spelling
|
||||
<https://pypi.org/project/sphinxcontrib-spelling/>`_ first. Then from the
|
||||
You'll need to install :pypi:`sphinxcontrib-spelling` first. Then from the
|
||||
``docs`` directory, run ``make spelling``. Wrong words (if any) along with the
|
||||
file and line number where they occur will be saved to
|
||||
``_build/spelling/output.txt``.
|
||||
|
||||
Reference in New Issue
Block a user