From dbdc192ca30b70a9f22c6bc4b3155bbccd01c323 Mon Sep 17 00:00:00 2001 From: David Smith Date: Mon, 25 May 2020 17:05:22 +0100 Subject: [PATCH] Preferred usage of among/while to amongst/whilst. --- django/core/checks/model_checks.py | 4 ++-- docs/howto/writing-migrations.txt | 2 +- docs/ref/checks.txt | 4 ++-- docs/ref/forms/fields.txt | 4 ++-- docs/ref/models/querysets.txt | 2 +- docs/releases/1.9.txt | 2 +- docs/releases/2.1.15.txt | 2 +- docs/releases/2.2.8.txt | 2 +- docs/spelling_wordlist | 1 - docs/topics/db/queries.txt | 2 +- docs/topics/files.txt | 6 +++--- tests/cache/tests.py | 4 ++-- tests/check_framework/test_model_checks.py | 12 ++++++------ 13 files changed, 23 insertions(+), 24 deletions(-) diff --git a/django/core/checks/model_checks.py b/django/core/checks/model_checks.py index 7b156fceee..15d9b7fd86 100644 --- a/django/core/checks/model_checks.py +++ b/django/core/checks/model_checks.py @@ -64,7 +64,7 @@ def check_all_models(app_configs=None, **kwargs): Error( "index name '%s' is not unique %s %s." % ( index_name, - 'for model' if len(model_labels) == 1 else 'amongst models:', + 'for model' if len(model_labels) == 1 else 'among models:', ', '.join(sorted(model_labels)), ), id='models.E029' if len(model_labels) == 1 else 'models.E030', @@ -77,7 +77,7 @@ def check_all_models(app_configs=None, **kwargs): Error( "constraint name '%s' is not unique %s %s." % ( constraint_name, - 'for model' if len(model_labels) == 1 else 'amongst models:', + 'for model' if len(model_labels) == 1 else 'among models:', ', '.join(sorted(model_labels)), ), id='models.E031' if len(model_labels) == 1 else 'models.E032', diff --git a/docs/howto/writing-migrations.txt b/docs/howto/writing-migrations.txt index ab1a897aa0..00dc0dfadf 100644 --- a/docs/howto/writing-migrations.txt +++ b/docs/howto/writing-migrations.txt @@ -327,7 +327,7 @@ If you change a :class:`~django.db.models.ManyToManyField` to use a ``through`` model, the default migration will delete the existing table and create a new one, losing the existing relations. To avoid this, you can use :class:`.SeparateDatabaseAndState` to rename the existing table to the new -table name whilst telling the migration autodetector that the new model has +table name while telling the migration autodetector that the new model has been created. You can check the existing table name through :djadmin:`sqlmigrate` or :djadmin:`dbshell`. You can check the new table name with the through model's ``_meta.db_table`` property. Your new ``through`` diff --git a/docs/ref/checks.txt b/docs/ref/checks.txt index 79b8de1591..d5aeca2d8c 100644 --- a/docs/ref/checks.txt +++ b/docs/ref/checks.txt @@ -343,11 +343,11 @@ Models * **models.E028**: ``db_table`` ```` is used by multiple models: ````. * **models.E029**: index name ```` is not unique for model ````. -* **models.E030**: index name ```` is not unique amongst models: +* **models.E030**: index name ```` is not unique among models: ````. * **models.E031**: constraint name ```` is not unique for model ````. -* **models.E032**: constraint name ```` is not unique amongst +* **models.E032**: constraint name ```` is not unique among models: ````. * **models.E033**: The index name ```` cannot start with an underscore or a number. diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt index 58db957512..d7f3ca17a2 100644 --- a/docs/ref/forms/fields.txt +++ b/docs/ref/forms/fields.txt @@ -711,7 +711,7 @@ For each field, we describe the default widget used if you don't specify After the field has been cleaned and validated, the ``UploadedFile`` object will have an additional ``image`` attribute containing the Pillow `Image`_ instance used to check if the file was a valid image. Pillow - closes the underlying file descriptor after verifying an image, so whilst + closes the underlying file descriptor after verifying an image, so while non-image data attributes, such as ``format``, ``height``, and ``width``, are available, methods that access the underlying image data, such as ``getdata()`` or ``getpixel()``, cannot be used without reopening the file. @@ -1354,7 +1354,7 @@ By default, :class:`ModelChoiceField` and :class:`ModelMultipleChoiceField` use When iterated, ``ModelChoiceIterator`` yields 2-tuple choices containing :class:`ModelChoiceIteratorValue` instances as the first ``value`` element in -each choice. ``ModelChoiceIteratorValue`` wraps the choice value whilst +each choice. ``ModelChoiceIteratorValue`` wraps the choice value while maintaining a reference to the source model instance that can be used in custom widget implementations, for example, to add `data-* attributes`_ to ``