From 67b5f506a600a54658405cf821c14ada4080e61f Mon Sep 17 00:00:00 2001 From: David Smith <39445562+smithdc1@users.noreply.github.com> Date: Thu, 10 Mar 2022 09:18:31 +0000 Subject: [PATCH] Changed some words to use inline markup. --- docs/howto/custom-model-fields.txt | 4 ++-- docs/howto/static-files/index.txt | 2 +- .../contributing/writing-code/javascript.txt | 2 +- .../contributing/writing-code/unit-tests.txt | 5 +++-- docs/internals/howto-release-django.txt | 12 ++++++------ docs/ref/models/fields.txt | 2 +- docs/ref/signals.txt | 4 ++-- docs/ref/templates/builtins.txt | 2 +- docs/releases/1.0-porting-guide.txt | 2 +- docs/releases/1.4.txt | 2 +- docs/releases/1.5.txt | 2 +- docs/releases/1.6.1.txt | 3 ++- docs/releases/1.6.txt | 2 +- docs/releases/1.7.txt | 4 ++-- docs/releases/1.9.1.txt | 2 +- docs/releases/1.9.txt | 4 ++-- docs/releases/2.0.txt | 2 +- docs/spelling_wordlist | 9 --------- docs/topics/db/optimization.txt | 4 ++-- docs/topics/i18n/translation.txt | 18 +++++++++--------- docs/topics/testing/overview.txt | 6 +++--- 21 files changed, 43 insertions(+), 50 deletions(-) diff --git a/docs/howto/custom-model-fields.txt b/docs/howto/custom-model-fields.txt index 22a7f4dfb3..2dedf05a11 100644 --- a/docs/howto/custom-model-fields.txt +++ b/docs/howto/custom-model-fields.txt @@ -493,8 +493,8 @@ following arguments: * ``None`` (if the field allows ``null=True``) -In our ``HandField`` class, we're storing the data as a VARCHAR field in the -database, so we need to be able to process strings and ``None`` in the +In our ``HandField`` class, we're storing the data as a ``VARCHAR`` field in +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`` instances:: diff --git a/docs/howto/static-files/index.txt b/docs/howto/static-files/index.txt index e158e78bca..20d21eb07c 100644 --- a/docs/howto/static-files/index.txt +++ b/docs/howto/static-files/index.txt @@ -89,7 +89,7 @@ This is not suitable for production use! For some common deployment strategies, see :doc:`/howto/static-files/deployment`. 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.urls.static import static diff --git a/docs/internals/contributing/writing-code/javascript.txt b/docs/internals/contributing/writing-code/javascript.txt index b75f01059d..9b8bacdac1 100644 --- a/docs/internals/contributing/writing-code/javascript.txt +++ b/docs/internals/contributing/writing-code/javascript.txt @@ -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 `_. Running tests diff --git a/docs/internals/contributing/writing-code/unit-tests.txt b/docs/internals/contributing/writing-code/unit-tests.txt index db0a732d2f..a2f9b392aa 100644 --- a/docs/internals/contributing/writing-code/unit-tests.txt +++ b/docs/internals/contributing/writing-code/unit-tests.txt @@ -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`` by prefixing the argument list with ``--``, as above. -Tox also respects the :envvar:`DJANGO_SETTINGS_MODULE` environment variable, if -set. For example, the following is equivalent to the command above: +``Tox`` also respects the :envvar:`DJANGO_SETTINGS_MODULE` environment +variable, if set. For example, the following is equivalent to the command +above: .. code-block:: console diff --git a/docs/internals/howto-release-django.txt b/docs/internals/howto-release-django.txt index b715cd6fed..5e6e18fc13 100644 --- a/docs/internals/howto-release-django.txt +++ b/docs/internals/howto-release-django.txt @@ -121,9 +121,9 @@ any time leading up to the actual release: $ python scripts/manage_translations.py fetch - and then commit the changed/added files (both .po and .mo). Sometimes there - are validation errors which need to be debugged, so avoid doing this task - immediately before a release is needed. + and then commit the changed/added files (both ``.po`` and ``.mo``). + Sometimes there are validation errors which need to be debugged, so avoid + doing this task immediately before a release is needed. #. :ref:`Update the django-admin manual page `:: @@ -345,9 +345,9 @@ Now you're ready to actually put the release out there. To do this: $ twine upload -s dist/* #. 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-.tar.gz). - So for example enter "1.5.1" or "1.4c2", etc. If the release is part of - an LTS branch, mark it so. + exactly as it appears in the name of the tarball + (``Django-.tar.gz``). So for example enter "1.5.1" or "1.4c2", etc. + If the release is part of an LTS branch, mark it so. __ https://www.djangoproject.com/admin/releases/release/add/ diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt index 975a6ecea0..b0dedd4699 100644 --- a/docs/ref/models/fields.txt +++ b/docs/ref/models/fields.txt @@ -1610,7 +1610,7 @@ The possible values for :attr:`~ForeignKey.on_delete` are found in Set the :class:`ForeignKey` to the value passed to :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 - 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:: from django.conf import settings diff --git a/docs/ref/signals.txt b/docs/ref/signals.txt index 6f0ce0527c..5180826e68 100644 --- a/docs/ref/signals.txt +++ b/docs/ref/signals.txt @@ -422,7 +422,7 @@ Arguments sent with this signal: Same as ``sender``. ``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. Functions which listen for :data:`pre_migrate` should adjust what they @@ -481,7 +481,7 @@ Arguments sent with this signal: Same as ``sender``. ``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. Functions which listen for :data:`post_migrate` should adjust what they diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt index d566f010b0..0df9ea2227 100644 --- a/docs/ref/templates/builtins.txt +++ b/docs/ref/templates/builtins.txt @@ -2397,7 +2397,7 @@ Newlines in the HTML content will be preserved. ------------------ Recursively takes a self-nested list and returns an HTML unordered list -- -WITHOUT opening and closing
    tags. +WITHOUT opening and closing ``
      `` tags. The list is assumed to be in the proper format. For example, if ``var`` contains ``['States', ['Kansas', ['Lawrence', 'Topeka'], 'Illinois']]``, then diff --git a/docs/releases/1.0-porting-guide.txt b/docs/releases/1.0-porting-guide.txt index 5bd1e14a9c..3075d21de9 100644 --- a/docs/releases/1.0-porting-guide.txt +++ b/docs/releases/1.0-porting-guide.txt @@ -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 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 following, replacing ```` in the code below with each app's name: diff --git a/docs/releases/1.4.txt b/docs/releases/1.4.txt index d18061240f..85f1b94a9c 100644 --- a/docs/releases/1.4.txt +++ b/docs/releases/1.4.txt @@ -634,7 +634,7 @@ Django 1.4 also includes several smaller improvements worth noting: :meth:`~django.db.models.query.QuerySet.distinct`. * 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. For details, see :ref:`auth_password_reset`. diff --git a/docs/releases/1.5.txt b/docs/releases/1.5.txt index 553e5156eb..41eb032aba 100644 --- a/docs/releases/1.5.txt +++ b/docs/releases/1.5.txt @@ -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, 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. * The :ref:`receiver ` decorator is now able to diff --git a/docs/releases/1.6.1.txt b/docs/releases/1.6.1.txt index 995cf95934..081772b404 100644 --- a/docs/releases/1.6.1.txt +++ b/docs/releases/1.6.1.txt @@ -11,7 +11,8 @@ included. 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 manager (``related_name`` ending with '+') from being used as a lookup for ``prefetch_related`` (#21410). diff --git a/docs/releases/1.6.txt b/docs/releases/1.6.txt index 27e52195b1..aac7c80c59 100644 --- a/docs/releases/1.6.txt +++ b/docs/releases/1.6.txt @@ -946,7 +946,7 @@ Miscellaneous with ``localhost`` as the domain. * 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 been removed. Use ``socket.error`` provided by the standard library instead. diff --git a/docs/releases/1.7.txt b/docs/releases/1.7.txt index 51d558b32b..9263a5ab58 100644 --- a/docs/releases/1.7.txt +++ b/docs/releases/1.7.txt @@ -675,7 +675,7 @@ Internationalization 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 ``{% 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. * 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`` 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: :setting:`LANGUAGE_COOKIE_AGE`, :setting:`LANGUAGE_COOKIE_DOMAIN` diff --git a/docs/releases/1.9.1.txt b/docs/releases/1.9.1.txt index 27c22c0001..e1f59c6296 100644 --- a/docs/releases/1.9.1.txt +++ b/docs/releases/1.9.1.txt @@ -77,7 +77,7 @@ Bugfixes * Made ``loaddata`` skip disabling and enabling database constraints when it 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`). * Fixed a crash in ``QuerySet.values()/values_list()`` after an ``annotate()`` diff --git a/docs/releases/1.9.txt b/docs/releases/1.9.txt index a12151fc80..0987786930 100644 --- a/docs/releases/1.9.txt +++ b/docs/releases/1.9.txt @@ -406,8 +406,8 @@ Internationalization project and it will find all the app message files that were created by :djadmin:`makemessages`. -* :djadmin:`makemessages` now calls xgettext once per locale directory rather - than once per translatable file. This speeds up localization builds. +* :djadmin:`makemessages` now calls ``xgettext`` once per locale directory + rather than once per translatable file. This speeds up localization builds. * :ttag:`blocktrans` supports assigning its output to a variable using ``asvar``. diff --git a/docs/releases/2.0.txt b/docs/releases/2.0.txt index c3730a794b..332f5ae344 100644 --- a/docs/releases/2.0.txt +++ b/docs/releases/2.0.txt @@ -212,7 +212,7 @@ Management Commands ``PositiveIntegerField`` or ``PositiveSmallIntegerField``. * 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 `. diff --git a/docs/spelling_wordlist b/docs/spelling_wordlist index 12ea02dc0d..94a1a13600 100644 --- a/docs/spelling_wordlist +++ b/docs/spelling_wordlist @@ -195,7 +195,6 @@ GiST Googol Greenhill gunicorn -gz GZip gzipped hardcode @@ -356,13 +355,11 @@ Pinterest plaintext pluggable pluralizations -po pooler postfix postgis postgres postgresql -pq pre precisions precomputation @@ -390,7 +387,6 @@ pseudocode psycopg Punycode Puthraya -py pyformat pysqlite pythonic @@ -400,7 +396,6 @@ querysets querystring queueing Quickstart -QUnit quoteless Radziej rasters @@ -535,7 +530,6 @@ titlecase tokenized toolkits toolset -Tox trac tracebacks transactional @@ -548,7 +542,6 @@ trigram trigrams Turkmen tv -ul umask unannotated unapplied @@ -600,7 +593,6 @@ uWSGI validator validators validsite -VARCHAR variadic vendored virtualized @@ -614,6 +606,5 @@ wrappable wsgi www xe -xgettext xxxxx Zope diff --git a/docs/topics/db/optimization.txt b/docs/topics/db/optimization.txt index 04f8cfc88b..166d50710f 100644 --- a/docs/topics/db/optimization.txt +++ b/docs/topics/db/optimization.txt @@ -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. 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 -row in the results, even if it ends up only using a few columns. The +has to read most of the non-text, non-``VARCHAR`` data from the disk for a +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 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. diff --git a/docs/topics/i18n/translation.txt b/docs/topics/i18n/translation.txt index 4a10007d3f..650852c50c 100644 --- a/docs/topics/i18n/translation.txt +++ b/docs/topics/i18n/translation.txt @@ -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 character to separate them. This is quite useful for indenting the content of a ``{% blocktranslate %}`` tag without having the indentation characters end up -in the corresponding entry in the PO file, which makes the translation process -easier. +in the corresponding entry in the ``.po`` file, which makes the translation +process easier. For instance, the following ``{% blocktranslate %}`` tag:: @@ -730,8 +730,8 @@ For instance, the following ``{% blocktranslate %}`` tag:: Second paragraph. {% endblocktranslate %} -will result in the entry ``"First sentence. Second paragraph."`` in the PO file, -compared to ``"\n First sentence.\n Second paragraph.\n"``, if the +will result in the entry ``"First sentence. Second paragraph."`` in the ``.po`` +file, compared to ``"\n First sentence.\n Second paragraph.\n"``, if the ``trimmed`` option had not been specified. 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 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 - files are created). This means that everybody will be using the same - encoding, which is important when Django processes the PO files. + **must** use UTF-8 as the encoding for your ``.po`` files (the default when + ``.po`` files are created). This means that everybody will be using the + same encoding, which is important when Django processes the ``.po`` files. .. admonition:: Fuzzy entries @@ -1646,7 +1646,7 @@ That's it. Your translations are ready for use. :djadmin:`django-admin compilemessages ` works see :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 (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 translation utilities with a ``gettext`` package if the command ``xgettext --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: diff --git a/docs/topics/testing/overview.txt b/docs/topics/testing/overview.txt index 3c45d509ae..7bfc3dd1dd 100644 --- a/docs/topics/testing/overview.txt +++ b/docs/topics/testing/overview.txt @@ -81,7 +81,7 @@ your project's ``manage.py`` utility:: Test discovery is based on the unittest module's :py:ref:`built-in 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 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 setting. -Caches are not cleared after each test, and running "manage.py test fooapp" can -insert data from the tests into the cache of a live system if you run your +Caches are not cleared after each test, and running ``manage.py test fooapp`` +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 used. This behavior :ticket:`may change <11505>` in the future.