Skip to content

Commit 4a954cf

Browse files
rixxfelixxm
authored andcommitted
Fixed #30573 -- Rephrased documentation to avoid words that minimise the involved difficulty.
This patch does not remove all occurrences of the words in question. Rather, I went through all of the occurrences of the words listed below, and judged if they a) suggested the reader had some kind of knowledge/experience, and b) if they added anything of value (including tone of voice, etc). I left most of the words alone. I looked at the following words: - simply/simple - easy/easier/easiest - obvious - just - merely - straightforward - ridiculous Thanks to Carlton Gibson for guidance on how to approach this issue, and to Tim Bell for providing the idea. But the enormous lion's share of thanks go to Adam Johnson for his patient and helpful review.
1 parent addabc4 commit 4a954cf

File tree

149 files changed

+1101
-1157
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

149 files changed

+1101
-1157
lines changed

docs/faq/admin.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ modules to the page via the model's class Admin :ref:`js parameter
7878
pointing to JavaScript modules that will be included within the admin form via
7979
a ``<script>`` tag.
8080

81-
If you want more flexibility than simply tweaking the auto-generated forms,
82-
feel free to write custom views for the admin. The admin is powered by Django
83-
itself, and you can write custom views that hook into the authentication
81+
If you want more flexibility than is feasible by tweaking the auto-generated
82+
forms, feel free to write custom views for the admin. The admin is powered by
83+
Django itself, and you can write custom views that hook into the authentication
8484
system, check permissions and do whatever else they need to do.
8585

8686
If you want to customize the look-and-feel of the admin interface, read the

docs/faq/contributing.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ of a larger problem. While we can spend time writing, testing and applying
8484
lots of little patches, sometimes the right solution is to rebuild. If a
8585
rebuild or refactor of a particular component has been proposed or is
8686
underway, you may find that bugs affecting that component will not get as much
87-
attention. Again, this is just a matter of prioritizing scarce resources. By
87+
attention. Again, this is a matter of prioritizing scarce resources. By
8888
concentrating on the rebuild, we can close all the little bugs at once, and
8989
hopefully prevent other little bugs from appearing in the future.
9090

@@ -93,7 +93,7 @@ bug regularly, it doesn't necessarily follow that every single Django user
9393
will hit the same bug. Different users use Django in different ways, stressing
9494
different parts of the code under different conditions. When we evaluate the
9595
relative priorities, we are generally trying to consider the needs of the
96-
entire community, not just the severity for one particular user. This doesn't
97-
mean that we think your problem is unimportant -- just that in the limited
98-
time we have available, we will always err on the side of making 10 people
99-
happy rather than making 1 person happy.
96+
entire community, instead of prioritizing the impact on one particular user.
97+
This doesn't mean that we think your problem is unimportant -- just that in the
98+
limited time we have available, we will always err on the side of making 10
99+
people happy rather than making a single person happy.

docs/faq/models.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ How can I see the raw SQL queries Django is running?
88
====================================================
99

1010
Make sure your Django :setting:`DEBUG` setting is set to ``True``.
11-
Then, just do this::
11+
Then do this::
1212

1313
>>> from django.db import connection
1414
>>> connection.queries
@@ -32,7 +32,7 @@ same interface on each member of the ``connections`` dictionary::
3232
>>> connections['my_db_alias'].queries
3333

3434
If you need to clear the query list manually at any point in your functions,
35-
just call ``reset_queries()``, like this::
35+
call ``reset_queries()``, like this::
3636

3737
from django.db import reset_queries
3838
reset_queries()
@@ -61,8 +61,8 @@ But this isn't an issue in practice, because there's nothing stopping you from
6161
adding other constraints (using the ``unique_together`` model option or
6262
creating the constraint directly in your database), and enforcing the
6363
uniqueness at that level. Single-column primary keys are needed for things such
64-
as the admin interface to work; e.g., you need a simple way of being able to
65-
specify an object to edit or delete.
64+
as the admin interface to work; e.g., you need a single value to specify
65+
an object to edit or delete.
6666

6767
Does Django support NoSQL databases?
6868
====================================

docs/faq/usage.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ Using a :class:`~django.db.models.FileField` or an
6161
How do I make a variable available to all my templates?
6262
=======================================================
6363

64-
Sometimes your templates just all need the same thing. A common example would
65-
be dynamically-generated menus. At first glance, it seems logical to simply
66-
add a common dictionary to the template context.
64+
Sometimes your templates all need the same thing. A common example would be
65+
dynamically generated menus. At first glance, it seems logical to add a common
66+
dictionary to the template context.
6767

68-
The correct solution is to use a ``RequestContext``. Details on how to do this
69-
are here: :ref:`subclassing-context-requestcontext`.
68+
The best way to do this in Django is to use a ``RequestContext``. Details on
69+
how to do this are here: :ref:`subclassing-context-requestcontext`.

docs/howto/auth-remote-user.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ Using ``REMOTE_USER`` on login pages only
111111

112112
The ``RemoteUserMiddleware`` authentication middleware assumes that the HTTP
113113
request header ``REMOTE_USER`` is present with all authenticated requests. That
114-
might be expected and practical when Basic HTTP Auth with ``htpasswd`` or other
115-
simple mechanisms are used, but with Negotiate (GSSAPI/Kerberos) or other
114+
might be expected and practical when Basic HTTP Auth with ``htpasswd`` or
115+
similar mechanisms are used, but with Negotiate (GSSAPI/Kerberos) or other
116116
resource intensive authentication methods, the authentication in the front-end
117117
HTTP server is usually only set up for one or a few login URLs, and after
118118
successful authentication, the application is supposed to maintain the

docs/howto/custom-lookups.txt

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ filtering (for example, ``exact`` and ``icontains``). This documentation
99
explains how to write custom lookups and how to alter the working of existing
1010
lookups. For the API references of lookups, see the :doc:`/ref/models/lookups`.
1111

12-
A simple lookup example
13-
=======================
12+
A lookup example
13+
================
1414

15-
Let's start with a simple custom lookup. We will write a custom lookup ``ne``
15+
Let's start with a small custom lookup. We will write a custom lookup ``ne``
1616
which works opposite to ``exact``. ``Author.objects.filter(name__ne='Jack')``
1717
will translate to the SQL:
1818

@@ -24,8 +24,7 @@ This SQL is backend independent, so we don't need to worry about different
2424
databases.
2525

2626
There are two steps to making this work. Firstly we need to implement the
27-
lookup, then we need to tell Django about it. The implementation is quite
28-
straightforward::
27+
lookup, then we need to tell Django about it::
2928

3029
from django.db.models import Lookup
3130

@@ -38,10 +37,10 @@ straightforward::
3837
params = lhs_params + rhs_params
3938
return '%s <> %s' % (lhs, rhs), params
4039

41-
To register the ``NotEqual`` lookup we will just need to call
42-
``register_lookup`` on the field class we want the lookup to be available. In
43-
this case, the lookup makes sense on all ``Field`` subclasses, so we register
44-
it with ``Field`` directly::
40+
To register the ``NotEqual`` lookup we will need to call ``register_lookup`` on
41+
the field class we want the lookup to be available for. In this case, the lookup
42+
makes sense on all ``Field`` subclasses, so we register it with ``Field``
43+
directly::
4544

4645
from django.db.models.fields import Field
4746
Field.register_lookup(NotEqual)
@@ -94,8 +93,8 @@ Finally we combine the parts into an SQL expression with ``<>``, and supply all
9493
the parameters for the query. We then return a tuple containing the generated
9594
SQL string and the parameters.
9695

97-
A simple transformer example
98-
============================
96+
A transformer example
97+
=====================
9998

10099
The custom lookup above is great, but in some cases you may want to be able to
101100
chain lookups together. For example, let's suppose we are building an
@@ -241,10 +240,10 @@ want the transformation to be applied to both the left-hand side and the
241240
right-hand side. For instance, if you want to filter a queryset based on the
242241
equality of the left and right-hand side insensitively to some SQL function.
243242

244-
Let's examine the simple example of case-insensitive transformation here. This
245-
transformation isn't very useful in practice as Django already comes with a bunch
246-
of built-in case-insensitive lookups, but it will be a nice demonstration of
247-
bilateral transformations in a database-agnostic way.
243+
Let's examine case-insensitive transformations here. This transformation isn't
244+
very useful in practice as Django already comes with a bunch of built-in
245+
case-insensitive lookups, but it will be a nice demonstration of bilateral
246+
transformations in a database-agnostic way.
248247

249248
We define an ``UpperCase`` transformer which uses the SQL function ``UPPER()`` to
250249
transform the values before comparison. We define

docs/howto/custom-management-commands.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ distributing. In this document, we will be building a custom ``closepoll``
1010
command for the ``polls`` application from the
1111
:doc:`tutorial</intro/tutorial01>`.
1212

13-
To do this, just add a ``management/commands`` directory to the application.
14-
Django will register a ``manage.py`` command for each Python module in that
15-
directory whose name doesn't begin with an underscore. For example::
13+
To do this, add a ``management/commands`` directory to the application. Django
14+
will register a ``manage.py`` command for each Python module in that directory
15+
whose name doesn't begin with an underscore. For example::
1616

1717
polls/
1818
__init__.py

docs/howto/custom-model-fields.txt

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ something like this::
5050

5151
.. _Bridge: https://en.wikipedia.org/wiki/Contract_bridge
5252

53-
This is just an ordinary Python class, with nothing Django-specific about it.
53+
This is an ordinary Python class, with nothing Django-specific about it.
5454
We'd like to be able to do things like this in our models (we assume the
5555
``hand`` attribute on the model is an instance of ``Hand``)::
5656

@@ -81,11 +81,12 @@ Background theory
8181
Database storage
8282
----------------
8383

84-
The simplest way to think of a model field is that it provides a way to take a
85-
normal Python object -- string, boolean, ``datetime``, or something more
86-
complex like ``Hand`` -- and convert it to and from a format that is useful
87-
when dealing with the database (and serialization, but, as we'll see later,
88-
that falls out fairly naturally once you have the database side under control).
84+
Let's start with model fields. If you break it down, a model field provides a
85+
way to take a normal Python object -- string, boolean, ``datetime``, or
86+
something more complex like ``Hand`` -- and convert it to and from a format
87+
that is useful when dealing with the database. (Such a format is also useful
88+
for serialization, but as we'll see later, that is easier once you have the
89+
database side under control).
8990

9091
Fields in a model must somehow be converted to fit into an existing database
9192
column type. Different databases provide different sets of valid column types,
@@ -94,8 +95,7 @@ with. Anything you want to store in the database must fit into one of
9495
those types.
9596

9697
Normally, you're either writing a Django field to match a particular database
97-
column type, or there's a fairly straightforward way to convert your data to,
98-
say, a string.
98+
column type, or you will need a way to convert your data to, say, a string.
9999

100100
For our ``Hand`` example, we could convert the card data to a string of 104
101101
characters by concatenating all the cards together in a pre-determined order --
@@ -180,16 +180,16 @@ card values plus their suits; 104 characters in total.
180180
with. For example, you can pass both
181181
:attr:`~django.db.models.Field.editable` and
182182
:attr:`~django.db.models.DateField.auto_now` to a
183-
:class:`django.db.models.DateField` and it will simply ignore the
183+
:class:`django.db.models.DateField` and it will ignore the
184184
:attr:`~django.db.models.Field.editable` parameter
185185
(:attr:`~django.db.models.DateField.auto_now` being set implies
186186
``editable=False``). No error is raised in this case.
187187

188188
This behavior simplifies the field classes, because they don't need to
189-
check for options that aren't necessary. They just pass all the options to
189+
check for options that aren't necessary. They pass all the options to
190190
the parent class and then don't use them later on. It's up to you whether
191191
you want your fields to be more strict about the options they select, or to
192-
use the simpler, more permissive behavior of the current fields.
192+
use the more permissive behavior of the current fields.
193193

194194
The ``Field.__init__()`` method takes the following parameters:
195195

@@ -241,11 +241,11 @@ then there's no need to write a new ``deconstruct()`` method. If, however,
241241
you're changing the arguments passed in ``__init__()`` (like we are in
242242
``HandField``), you'll need to supplement the values being passed.
243243

244-
The contract of ``deconstruct()`` is simple; it returns a tuple of four items:
245-
the field's attribute name, the full import path of the field class, the
246-
positional arguments (as a list), and the keyword arguments (as a dict). Note
247-
this is different from the ``deconstruct()`` method :ref:`for custom classes
248-
<custom-deconstruct-method>` which returns a tuple of three things.
244+
``deconstruct()`` returns a tuple of four items: the field's attribute name,
245+
the full import path of the field class, the positional arguments (as a list),
246+
and the keyword arguments (as a dict). Note this is different from the
247+
``deconstruct()`` method :ref:`for custom classes <custom-deconstruct-method>`
248+
which returns a tuple of three things.
249249

250250
As a custom field author, you don't need to care about the first two values;
251251
the base ``Field`` class has all the code to work out the field's attribute
@@ -307,8 +307,8 @@ mind that people will be reconstructing your field from the serialized version
307307
for quite a while (possibly years), depending how long your migrations live for.
308308

309309
You can see the results of deconstruction by looking in migrations that include
310-
the field, and you can test deconstruction in unit tests by just deconstructing
311-
and reconstructing the field::
310+
the field, and you can test deconstruction in unit tests by deconstructing and
311+
reconstructing the field::
312312

313313
name, path, args, kwargs = my_field_instance.deconstruct()
314314
new_instance = MyField(*args, **kwargs)
@@ -349,10 +349,10 @@ As always, you should document your field type, so users will know what it is.
349349
In addition to providing a docstring for it, which is useful for developers,
350350
you can also allow users of the admin app to see a short description of the
351351
field type via the :doc:`django.contrib.admindocs
352-
</ref/contrib/admin/admindocs>` application. To do this simply provide
353-
descriptive text in a :attr:`~Field.description` class attribute of your custom
354-
field. In the above example, the description displayed by the ``admindocs``
355-
application for a ``HandField`` will be 'A hand of cards (bridge style)'.
352+
</ref/contrib/admin/admindocs>` application. To do this provide descriptive
353+
text in a :attr:`~Field.description` class attribute of your custom field. In
354+
the above example, the description displayed by the ``admindocs`` application
355+
for a ``HandField`` will be 'A hand of cards (bridge style)'.
356356

357357
In the :mod:`django.contrib.admindocs` display, the field description is
358358
interpolated with ``field.__dict__`` which allows the description to
@@ -393,8 +393,8 @@ Once you have ``MytypeField``, you can use it in any model, just like any other
393393
If you aim to build a database-agnostic application, you should account for
394394
differences in database column types. For example, the date/time column type
395395
in PostgreSQL is called ``timestamp``, while the same column in MySQL is called
396-
``datetime``. The simplest way to handle this in a :meth:`~Field.db_type`
397-
method is to check the ``connection.settings_dict['ENGINE']`` attribute.
396+
``datetime``. You can handle this in a :meth:`~Field.db_type` method by
397+
checking the ``connection.settings_dict['ENGINE']`` attribute.
398398

399399
For example::
400400

@@ -431,7 +431,7 @@ sense to have a ``CharMaxlength25Field``, shown here::
431431
my_field = CharMaxlength25Field()
432432

433433
The better way of doing this would be to make the parameter specifiable at run
434-
time -- i.e., when the class is instantiated. To do that, just implement
434+
time -- i.e., when the class is instantiated. To do that, implement
435435
``Field.__init__()``, like so::
436436

437437
# This is a much more flexible example.
@@ -730,7 +730,7 @@ accessed, and what methods are available. It lives at
730730
:doc:`file documentation </ref/files/file>`.
731731

732732
Once a subclass of ``File`` is created, the new ``FileField`` subclass must be
733-
told to use it. To do so, simply assign the new ``File`` subclass to the special
733+
told to use it. To do so, assign the new ``File`` subclass to the special
734734
``attr_class`` attribute of the ``FileField`` subclass.
735735

736736
A few suggestions

0 commit comments

Comments
 (0)