summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorAdam Johnson <me@adamj.eu>2020-05-01 13:37:21 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-05-04 12:10:47 +0200
commitd17b380653da5f95885ce53468fe7aac60672841 (patch)
tree9fbe962d480093a45cf238d22596812637765c74 /docs/ref
parent787981f9d1d5abc489a0b069e3353b8ad7aa9778 (diff)
Refs #30573 -- Rephrased "Of Course" and "Obvious(ly)" in documentation and comments.
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/applications.txt5
-rw-r--r--docs/ref/contrib/contenttypes.txt4
-rw-r--r--docs/ref/contrib/sites.txt3
-rw-r--r--docs/ref/databases.txt4
-rw-r--r--docs/ref/migration-operations.txt8
-rw-r--r--docs/ref/models/database-functions.txt4
-rw-r--r--docs/ref/models/fields.txt2
-rw-r--r--docs/ref/models/instances.txt8
-rw-r--r--docs/ref/models/querysets.txt4
-rw-r--r--docs/ref/templates/language.txt3
10 files changed, 20 insertions, 25 deletions
diff --git a/docs/ref/applications.txt b/docs/ref/applications.txt
index 17b5615400..d1a242163f 100644
--- a/docs/ref/applications.txt
+++ b/docs/ref/applications.txt
@@ -104,9 +104,8 @@ their :setting:`INSTALLED_APPS` setting. Besides this use case, it's best to
avoid using ``default_app_config`` and instead specify the app config class in
:setting:`INSTALLED_APPS` as described next.
-Of course, you can also tell your users to put
-``'rock_n_roll.apps.RockNRollConfig'`` in their :setting:`INSTALLED_APPS`
-setting. You can even provide several different
+You can also tell your users to put ``'rock_n_roll.apps.RockNRollConfig'`` in
+their :setting:`INSTALLED_APPS` setting. You can even provide several different
:class:`~django.apps.AppConfig` subclasses with different behaviors and allow
your users to choose one via their :setting:`INSTALLED_APPS` setting.
diff --git a/docs/ref/contrib/contenttypes.txt b/docs/ref/contrib/contenttypes.txt
index 43502c2e2e..66dbfe45ef 100644
--- a/docs/ref/contrib/contenttypes.txt
+++ b/docs/ref/contrib/contenttypes.txt
@@ -403,8 +403,8 @@ from ``TaggedItem``::
>>> TaggedItem.objects.filter(bookmark__url__contains='django')
<QuerySet [<TaggedItem: django>, <TaggedItem: python>]>
-Of course, if you don't add the ``related_query_name``, you can do the
-same types of lookups manually::
+If you don't add the ``related_query_name``, you can do the same types of
+lookups manually::
>>> bookmarks = Bookmark.objects.filter(url__contains='django')
>>> bookmark_type = ContentType.objects.get_for_model(Bookmark)
diff --git a/docs/ref/contrib/sites.txt b/docs/ref/contrib/sites.txt
index 442799ae81..11abed3231 100644
--- a/docs/ref/contrib/sites.txt
+++ b/docs/ref/contrib/sites.txt
@@ -134,8 +134,7 @@ For example::
# Do something else.
pass
-Of course, it's ugly to hard-code the site IDs like that. This sort of
-hard-coding is best for hackish fixes that you need done quickly. The
+It's fragile to hard-code the site IDs like that, in case they change. The
cleaner way of accomplishing the same thing is to check the current site's
domain::
diff --git a/docs/ref/databases.txt b/docs/ref/databases.txt
index b594618bb1..391797d412 100644
--- a/docs/ref/databases.txt
+++ b/docs/ref/databases.txt
@@ -19,8 +19,8 @@ design decisions on which features to support and which assumptions we can make
safely.
This file describes some of the features that might be relevant to Django
-usage. Of course, it is not intended as a replacement for server-specific
-documentation or reference manuals.
+usage. It is not intended as a replacement for server-specific documentation or
+reference manuals.
General notes
=============
diff --git a/docs/ref/migration-operations.txt b/docs/ref/migration-operations.txt
index 02afe67b51..a6b42bdc99 100644
--- a/docs/ref/migration-operations.txt
+++ b/docs/ref/migration-operations.txt
@@ -173,10 +173,10 @@ defaults and always applies them in the Django ORM code.
Removes a field from a model.
Bear in mind that when reversed, this is actually adding a field to a model.
-The operation is reversible (apart from any data loss, which of course is
-irreversible) if the field is nullable or if it has a default value that can be
-used to populate the recreated column. If the field is not nullable and does
-not have a default value, the operation is irreversible.
+The operation is reversible (apart from any data loss, which is irreversible)
+if the field is nullable or if it has a default value that can be used to
+populate the recreated column. If the field is not nullable and does not have a
+default value, the operation is irreversible.
``AlterField``
--------------
diff --git a/docs/ref/models/database-functions.txt b/docs/ref/models/database-functions.txt
index d0043857cd..b702085e77 100644
--- a/docs/ref/models/database-functions.txt
+++ b/docs/ref/models/database-functions.txt
@@ -517,8 +517,8 @@ should typically be used instead of the more verbose equivalent,
e.g. use ``TruncYear(...)`` rather than ``Trunc(..., kind='year')``.
The subclasses are all defined as transforms, but they aren't registered with
-any fields, because the obvious lookup names are already reserved by the
-``Extract`` subclasses.
+any fields, because the lookup names are already reserved by the ``Extract``
+subclasses.
Usage example::
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt
index 036a2c996e..e266715a36 100644
--- a/docs/ref/models/fields.txt
+++ b/docs/ref/models/fields.txt
@@ -1058,8 +1058,6 @@ directory on the filesystem. Has some special arguments, of which the first is
whether folders in the specified location should be included. Either this
or :attr:`~FilePathField.allow_files` must be ``True``.
-Of course, these arguments can be used together.
-
The one potential gotcha is that :attr:`~FilePathField.match` applies to the
base filename, not the full path. So, this example::
diff --git a/docs/ref/models/instances.txt b/docs/ref/models/instances.txt
index 43ed5934ca..06c63eba04 100644
--- a/docs/ref/models/instances.txt
+++ b/docs/ref/models/instances.txt
@@ -116,8 +116,8 @@ are loaded from the database::
super().save(*args, **kwargs)
The example above shows a full ``from_db()`` implementation to clarify how that
-is done. In this case it would of course be possible to use ``super()`` call in
-the ``from_db()`` method.
+is done. In this case it would be possible to use a ``super()`` call in the
+``from_db()`` method.
Refreshing objects from database
================================
@@ -528,8 +528,8 @@ Updating attributes based on existing fields
--------------------------------------------
Sometimes you'll need to perform a simple arithmetic task on a field, such
-as incrementing or decrementing the current value. The obvious way to
-achieve this is to do something like::
+as incrementing or decrementing the current value. One way of achieving this is
+doing the arithmetic in Python like::
>>> product = Product.objects.get(name='Venezuelan Beaver Cheese')
>>> product.number_sold += 1
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt
index c51c4dd43a..cd22b03418 100644
--- a/docs/ref/models/querysets.txt
+++ b/docs/ref/models/querysets.txt
@@ -1135,8 +1135,8 @@ This will fetch the best pizza and all the toppings for the best pizza for each
restaurant. This will be done in 3 database queries - one for the restaurants,
one for the 'best pizzas', and one for the toppings.
-Of course, the ``best_pizza`` relationship could also be fetched using
-``select_related`` to reduce the query count to 2:
+The ``best_pizza`` relationship could also be fetched using ``select_related``
+to reduce the query count to 2::
>>> Restaurant.objects.select_related('best_pizza').prefetch_related('best_pizza__toppings')
diff --git a/docs/ref/templates/language.txt b/docs/ref/templates/language.txt
index 5d4c8f147b..852d78a187 100644
--- a/docs/ref/templates/language.txt
+++ b/docs/ref/templates/language.txt
@@ -643,8 +643,7 @@ of all comments related to the current task with::
{{ task.comment_set.all.count }}
-And of course you can easily access methods you've explicitly defined on your
-own models:
+You can also access methods you've explicitly defined on your own models:
.. code-block:: python
:caption: models.py