1
0
mirror of https://github.com/django/django.git synced 2025-01-03 06:55:47 +00:00

Changed some words to use inline markup.

This commit is contained in:
David Smith 2022-03-10 09:18:31 +00:00 committed by GitHub
parent b1005c0e40
commit 67b5f506a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 43 additions and 50 deletions

View File

@ -493,8 +493,8 @@ following arguments:
* ``None`` (if the field allows ``null=True``) * ``None`` (if the field allows ``null=True``)
In our ``HandField`` class, we're storing the data as a VARCHAR field in the In our ``HandField`` class, we're storing the data as a ``VARCHAR`` field in
database, so we need to be able to process strings and ``None`` in the the database, so we need to be able to process strings and ``None`` in the
``from_db_value()``. In ``to_python()``, we need to also handle ``Hand`` ``from_db_value()``. In ``to_python()``, we need to also handle ``Hand``
instances:: instances::

View File

@ -89,7 +89,7 @@ This is not suitable for production use! For some common deployment
strategies, see :doc:`/howto/static-files/deployment`. strategies, see :doc:`/howto/static-files/deployment`.
For example, if your :setting:`STATIC_URL` is defined as ``static/``, you can For example, if your :setting:`STATIC_URL` is defined as ``static/``, you can
do this by adding the following snippet to your urls.py:: do this by adding the following snippet to your ``urls.py``::
from django.conf import settings from django.conf import settings
from django.conf.urls.static import static from django.conf.urls.static import static

View File

@ -78,7 +78,7 @@ Django's JavaScript tests use `QUnit`_. Here is an example test module:
}); });
Please consult the QUnit documentation for information on the types of Please consult the ``QUnit`` documentation for information on the types of
`assertions supported by QUnit <https://api.qunitjs.com/assert/>`_. `assertions supported by QUnit <https://api.qunitjs.com/assert/>`_.
Running tests Running tests

View File

@ -107,8 +107,9 @@ The remainder of this documentation shows commands for running tests without
``tox``, however, any option passed to ``runtests.py`` can also be passed to ``tox``, however, any option passed to ``runtests.py`` can also be passed to
``tox`` by prefixing the argument list with ``--``, as above. ``tox`` by prefixing the argument list with ``--``, as above.
Tox also respects the :envvar:`DJANGO_SETTINGS_MODULE` environment variable, if ``Tox`` also respects the :envvar:`DJANGO_SETTINGS_MODULE` environment
set. For example, the following is equivalent to the command above: variable, if set. For example, the following is equivalent to the command
above:
.. code-block:: console .. code-block:: console

View File

@ -121,9 +121,9 @@ any time leading up to the actual release:
$ python scripts/manage_translations.py fetch $ python scripts/manage_translations.py fetch
and then commit the changed/added files (both .po and .mo). Sometimes there and then commit the changed/added files (both ``.po`` and ``.mo``).
are validation errors which need to be debugged, so avoid doing this task Sometimes there are validation errors which need to be debugged, so avoid
immediately before a release is needed. doing this task immediately before a release is needed.
#. :ref:`Update the django-admin manual page <django-admin-manpage>`:: #. :ref:`Update the django-admin manual page <django-admin-manpage>`::
@ -345,9 +345,9 @@ Now you're ready to actually put the release out there. To do this:
$ twine upload -s dist/* $ twine upload -s dist/*
#. Go to the `Add release page in the admin`__, enter the new release number #. Go to the `Add release page in the admin`__, enter the new release number
exactly as it appears in the name of the tarball (Django-<version>.tar.gz). exactly as it appears in the name of the tarball
So for example enter "1.5.1" or "1.4c2", etc. If the release is part of (``Django-<version>.tar.gz``). So for example enter "1.5.1" or "1.4c2", etc.
an LTS branch, mark it so. If the release is part of an LTS branch, mark it so.
__ https://www.djangoproject.com/admin/releases/release/add/ __ https://www.djangoproject.com/admin/releases/release/add/

View File

@ -1610,7 +1610,7 @@ The possible values for :attr:`~ForeignKey.on_delete` are found in
Set the :class:`ForeignKey` to the value passed to Set the :class:`ForeignKey` to the value passed to
:func:`~django.db.models.SET()`, or if a callable is passed in, :func:`~django.db.models.SET()`, or if a callable is passed in,
the result of calling it. In most cases, passing a callable will be the result of calling it. In most cases, passing a callable will be
necessary to avoid executing queries at the time your models.py is necessary to avoid executing queries at the time your ``models.py`` is
imported:: imported::
from django.conf import settings from django.conf import settings

View File

@ -422,7 +422,7 @@ Arguments sent with this signal:
Same as ``sender``. Same as ``sender``.
``verbosity`` ``verbosity``
Indicates how much information manage.py is printing on screen. See Indicates how much information ``manage.py`` is printing on screen. See
the :option:`--verbosity` flag for details. the :option:`--verbosity` flag for details.
Functions which listen for :data:`pre_migrate` should adjust what they Functions which listen for :data:`pre_migrate` should adjust what they
@ -481,7 +481,7 @@ Arguments sent with this signal:
Same as ``sender``. Same as ``sender``.
``verbosity`` ``verbosity``
Indicates how much information manage.py is printing on screen. See Indicates how much information ``manage.py`` is printing on screen. See
the :option:`--verbosity` flag for details. the :option:`--verbosity` flag for details.
Functions which listen for :data:`post_migrate` should adjust what they Functions which listen for :data:`post_migrate` should adjust what they

View File

@ -2397,7 +2397,7 @@ Newlines in the HTML content will be preserved.
------------------ ------------------
Recursively takes a self-nested list and returns an HTML unordered list -- Recursively takes a self-nested list and returns an HTML unordered list --
WITHOUT opening and closing <ul> tags. WITHOUT opening and closing ``<ul>`` tags.
The list is assumed to be in the proper format. For example, if ``var`` The list is assumed to be in the proper format. For example, if ``var``
contains ``['States', ['Kansas', ['Lawrence', 'Topeka'], 'Illinois']]``, then contains ``['States', ['Kansas', ['Lawrence', 'Topeka'], 'Illinois']]``, then

View File

@ -551,7 +551,7 @@ need to reload your data. Do this after you have made the change to using
For SQLite, this means making a copy of the single file that stores the For SQLite, this means making a copy of the single file that stores the
database (the name of that file is the ``DATABASE_NAME`` in your database (the name of that file is the ``DATABASE_NAME`` in your
settings.py file). ``settings.py`` file).
To upgrade each application to use a ``DecimalField``, you can do the To upgrade each application to use a ``DecimalField``, you can do the
following, replacing ``<app>`` in the code below with each app's name: following, replacing ``<app>`` in the code below with each app's name:

View File

@ -634,7 +634,7 @@ Django 1.4 also includes several smaller improvements worth noting:
:meth:`~django.db.models.query.QuerySet.distinct`. :meth:`~django.db.models.query.QuerySet.distinct`.
* The admin login page will add a password reset link if you include a URL with * The admin login page will add a password reset link if you include a URL with
the name ``'admin_password_reset'`` in your urls.py, so plugging in the the name ``'admin_password_reset'`` in your ``urls.py``, so plugging in the
built-in password reset mechanism and making it available is now much easier. built-in password reset mechanism and making it available is now much easier.
For details, see :ref:`auth_password_reset`. For details, see :ref:`auth_password_reset`.

View File

@ -263,7 +263,7 @@ Django 1.5 also includes several smaller improvements worth noting:
* The :djadmin:`dumpdata` management command outputs one row at a time, * The :djadmin:`dumpdata` management command outputs one row at a time,
preventing out-of-memory errors when dumping large datasets. preventing out-of-memory errors when dumping large datasets.
* In the localflavor for Canada, "pq" was added to the acceptable codes for * In the localflavor for Canada, ``pq`` was added to the acceptable codes for
Quebec. It's an old abbreviation. Quebec. It's an old abbreviation.
* The :ref:`receiver <connecting-receiver-functions>` decorator is now able to * The :ref:`receiver <connecting-receiver-functions>` decorator is now able to

View File

@ -11,7 +11,8 @@ included.
Bug fixes Bug fixes
========= =========
* Fixed ``BCryptSHA256PasswordHasher`` with py-bcrypt and Python 3 (#21398). * Fixed ``BCryptSHA256PasswordHasher`` with ``py-bcrypt`` and Python 3
(#21398).
* Fixed a regression that prevented a ``ForeignKey`` with a hidden reverse * Fixed a regression that prevented a ``ForeignKey`` with a hidden reverse
manager (``related_name`` ending with '+') from being used as a lookup for manager (``related_name`` ending with '+') from being used as a lookup for
``prefetch_related`` (#21410). ``prefetch_related`` (#21410).

View File

@ -946,7 +946,7 @@ Miscellaneous
with ``localhost`` as the domain. with ``localhost`` as the domain.
* The new :option:`makemessages --keep-pot` option prevents deleting the * The new :option:`makemessages --keep-pot` option prevents deleting the
temporary .pot file generated before creating the .po file. temporary ``.pot`` file generated before creating the ``.po`` file.
* The undocumented ``django.core.servers.basehttp.WSGIServerException`` has * The undocumented ``django.core.servers.basehttp.WSGIServerException`` has
been removed. Use ``socket.error`` provided by the standard library instead. been removed. Use ``socket.error`` provided by the standard library instead.

View File

@ -675,7 +675,7 @@ Internationalization
beginning and end of a line and merge all lines into one using a space beginning and end of a line and merge all lines into one using a space
character to separate them. This is quite useful for indenting the content of character to separate them. This is quite useful for indenting the content of
a ``{% blocktrans %}`` tag without having the indentation characters end up a ``{% blocktrans %}`` tag without having the indentation characters end up
in the corresponding entry in the PO file, which makes the translation in the corresponding entry in the ``.po`` file, which makes the translation
process easier. process easier.
* When you run :djadmin:`makemessages` from the root directory of your project, * When you run :djadmin:`makemessages` from the root directory of your project,
@ -685,7 +685,7 @@ Internationalization
* The :djadmin:`makemessages` command now always adds the ``--previous`` * The :djadmin:`makemessages` command now always adds the ``--previous``
command line flag to the ``msgmerge`` command, keeping previously translated command line flag to the ``msgmerge`` command, keeping previously translated
strings in po files for fuzzy strings. strings in ``.po`` files for fuzzy strings.
* The following settings to adjust the language cookie options were introduced: * The following settings to adjust the language cookie options were introduced:
:setting:`LANGUAGE_COOKIE_AGE`, :setting:`LANGUAGE_COOKIE_DOMAIN` :setting:`LANGUAGE_COOKIE_AGE`, :setting:`LANGUAGE_COOKIE_DOMAIN`

View File

@ -77,7 +77,7 @@ Bugfixes
* Made ``loaddata`` skip disabling and enabling database constraints when it * Made ``loaddata`` skip disabling and enabling database constraints when it
doesn't load any fixtures (:ticket:`23372`). doesn't load any fixtures (:ticket:`23372`).
* Restored ``contrib.auth`` hashers compatibility with py-bcrypt * Restored ``contrib.auth`` hashers compatibility with ``py-bcrypt``
(:ticket:`26016`). (:ticket:`26016`).
* Fixed a crash in ``QuerySet.values()/values_list()`` after an ``annotate()`` * Fixed a crash in ``QuerySet.values()/values_list()`` after an ``annotate()``

View File

@ -406,8 +406,8 @@ Internationalization
project and it will find all the app message files that were created by project and it will find all the app message files that were created by
:djadmin:`makemessages`. :djadmin:`makemessages`.
* :djadmin:`makemessages` now calls xgettext once per locale directory rather * :djadmin:`makemessages` now calls ``xgettext`` once per locale directory
than once per translatable file. This speeds up localization builds. rather than once per translatable file. This speeds up localization builds.
* :ttag:`blocktrans` supports assigning its output to a variable using * :ttag:`blocktrans` supports assigning its output to a variable using
``asvar``. ``asvar``.

View File

@ -212,7 +212,7 @@ Management Commands
``PositiveIntegerField`` or ``PositiveSmallIntegerField``. ``PositiveIntegerField`` or ``PositiveSmallIntegerField``.
* The new :option:`makemessages --add-location` option controls the comment * The new :option:`makemessages --add-location` option controls the comment
format in PO files. format in ``.po`` files.
* :djadmin:`loaddata` can now :ref:`read from stdin <loading-fixtures-stdin>`. * :djadmin:`loaddata` can now :ref:`read from stdin <loading-fixtures-stdin>`.

View File

@ -195,7 +195,6 @@ GiST
Googol Googol
Greenhill Greenhill
gunicorn gunicorn
gz
GZip GZip
gzipped gzipped
hardcode hardcode
@ -356,13 +355,11 @@ Pinterest
plaintext plaintext
pluggable pluggable
pluralizations pluralizations
po
pooler pooler
postfix postfix
postgis postgis
postgres postgres
postgresql postgresql
pq
pre pre
precisions precisions
precomputation precomputation
@ -390,7 +387,6 @@ pseudocode
psycopg psycopg
Punycode Punycode
Puthraya Puthraya
py
pyformat pyformat
pysqlite pysqlite
pythonic pythonic
@ -400,7 +396,6 @@ querysets
querystring querystring
queueing queueing
Quickstart Quickstart
QUnit
quoteless quoteless
Radziej Radziej
rasters rasters
@ -535,7 +530,6 @@ titlecase
tokenized tokenized
toolkits toolkits
toolset toolset
Tox
trac trac
tracebacks tracebacks
transactional transactional
@ -548,7 +542,6 @@ trigram
trigrams trigrams
Turkmen Turkmen
tv tv
ul
umask umask
unannotated unannotated
unapplied unapplied
@ -600,7 +593,6 @@ uWSGI
validator validator
validators validators
validsite validsite
VARCHAR
variadic variadic
vendored vendored
virtualized virtualized
@ -614,6 +606,5 @@ wrappable
wsgi wsgi
www www
xe xe
xgettext
xxxxx xxxxx
Zope Zope

View File

@ -234,8 +234,8 @@ them. Note that if you *do* use them, the ORM will have to go and get them in
a separate query, making this a pessimization if you use it inappropriately. a separate query, making this a pessimization if you use it inappropriately.
Don't be too aggressive in deferring fields without profiling as the database Don't be too aggressive in deferring fields without profiling as the database
has to read most of the non-text, non-VARCHAR data from the disk for a single has to read most of the non-text, non-``VARCHAR`` data from the disk for a
row in the results, even if it ends up only using a few columns. The single row in the results, even if it ends up only using a few columns. The
``defer()`` and ``only()`` methods are most useful when you can avoid loading a ``defer()`` and ``only()`` methods are most useful when you can avoid loading a
lot of text data or for fields that might take a lot of processing to convert lot of text data or for fields that might take a lot of processing to convert
back to Python. As always, profile first, then optimize. back to Python. As always, profile first, then optimize.

View File

@ -720,8 +720,8 @@ the content of the ``{% blocktranslate %}`` tag, replace any whitespace at the
beginning and end of a line and merge all lines into one using a space beginning and end of a line and merge all lines into one using a space
character to separate them. This is quite useful for indenting the content of a character to separate them. This is quite useful for indenting the content of a
``{% blocktranslate %}`` tag without having the indentation characters end up ``{% blocktranslate %}`` tag without having the indentation characters end up
in the corresponding entry in the PO file, which makes the translation process in the corresponding entry in the ``.po`` file, which makes the translation
easier. process easier.
For instance, the following ``{% blocktranslate %}`` tag:: For instance, the following ``{% blocktranslate %}`` tag::
@ -730,8 +730,8 @@ For instance, the following ``{% blocktranslate %}`` tag::
Second paragraph. Second paragraph.
{% endblocktranslate %} {% endblocktranslate %}
will result in the entry ``"First sentence. Second paragraph."`` in the PO file, will result in the entry ``"First sentence. Second paragraph."`` in the ``.po``
compared to ``"\n First sentence.\n Second paragraph.\n"``, if the file, compared to ``"\n First sentence.\n Second paragraph.\n"``, if the
``trimmed`` option had not been specified. ``trimmed`` option had not been specified.
String literals passed to tags and filters String literals passed to tags and filters
@ -1607,9 +1607,9 @@ otherwise, they'll be tacked together without whitespace!
Due to the way the ``gettext`` tools work internally and because we want to Due to the way the ``gettext`` tools work internally and because we want to
allow non-ASCII source strings in Django's core and your applications, you allow non-ASCII source strings in Django's core and your applications, you
**must** use UTF-8 as the encoding for your PO files (the default when PO **must** use UTF-8 as the encoding for your ``.po`` files (the default when
files are created). This means that everybody will be using the same ``.po`` files are created). This means that everybody will be using the
encoding, which is important when Django processes the PO files. same encoding, which is important when Django processes the ``.po`` files.
.. admonition:: Fuzzy entries .. admonition:: Fuzzy entries
@ -1646,7 +1646,7 @@ That's it. Your translations are ready for use.
:djadmin:`django-admin compilemessages <compilemessages>` works see :djadmin:`django-admin compilemessages <compilemessages>` works see
:ref:`gettext_on_windows` for more information. :ref:`gettext_on_windows` for more information.
.. admonition:: .po files: Encoding and BOM usage. .. admonition:: ``.po`` files: Encoding and BOM usage.
Django only supports ``.po`` files encoded in UTF-8 and without any BOM Django only supports ``.po`` files encoded in UTF-8 and without any BOM
(Byte Order Mark) so if your text editor adds such marks to the beginning of (Byte Order Mark) so if your text editor adds such marks to the beginning of
@ -1709,7 +1709,7 @@ You may also use ``gettext`` binaries you have obtained elsewhere, so long as
the ``xgettext --version`` command works properly. Do not attempt to use Django the ``xgettext --version`` command works properly. Do not attempt to use Django
translation utilities with a ``gettext`` package if the command ``xgettext translation utilities with a ``gettext`` package if the command ``xgettext
--version`` entered at a Windows command prompt causes a popup window saying --version`` entered at a Windows command prompt causes a popup window saying
"xgettext.exe has generated errors and will be closed by Windows". "``xgettext.exe`` has generated errors and will be closed by Windows".
.. _customizing-makemessages: .. _customizing-makemessages:

View File

@ -81,7 +81,7 @@ your project's ``manage.py`` utility::
Test discovery is based on the unittest module's :py:ref:`built-in test Test discovery is based on the unittest module's :py:ref:`built-in test
discovery <unittest-test-discovery>`. By default, this will discover tests in discovery <unittest-test-discovery>`. By default, this will discover tests in
any file named "test*.py" under the current working directory. any file named ``test*.py`` under the current working directory.
You can specify particular tests to run by supplying any number of "test You can specify particular tests to run by supplying any number of "test
labels" to ``./manage.py test``. Each test label can be a full Python dotted labels" to ``./manage.py test``. Each test label can be a full Python dotted
@ -283,8 +283,8 @@ file, all Django tests run with :setting:`DEBUG`\=False. This is to ensure that
the observed output of your code matches what will be seen in a production the observed output of your code matches what will be seen in a production
setting. setting.
Caches are not cleared after each test, and running "manage.py test fooapp" can Caches are not cleared after each test, and running ``manage.py test fooapp``
insert data from the tests into the cache of a live system if you run your can insert data from the tests into the cache of a live system if you run your
tests in production because, unlike databases, a separate "test cache" is not tests in production because, unlike databases, a separate "test cache" is not
used. This behavior :ticket:`may change <11505>` in the future. used. This behavior :ticket:`may change <11505>` in the future.