mirror of
https://github.com/django/django.git
synced 2025-08-28 06:24:25 +00:00
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.
This commit is contained in:
parent
addabc492b
commit
4a954cfd11
149 changed files with 1101 additions and 1157 deletions
|
@ -24,7 +24,7 @@ may be a good choice for the :ref:`range fields <range-fields>` and
|
|||
|
||||
.. class:: ArrayField(base_field, size=None, **options)
|
||||
|
||||
A field for storing lists of data. Most field types can be used, you simply
|
||||
A field for storing lists of data. Most field types can be used, and you
|
||||
pass another field instance as the :attr:`base_field
|
||||
<ArrayField.base_field>`. You may also specify a :attr:`size
|
||||
<ArrayField.size>`. ``ArrayField`` can be nested to store multi-dimensional
|
||||
|
@ -333,7 +333,7 @@ We will use the following example model::
|
|||
Key lookups
|
||||
~~~~~~~~~~~
|
||||
|
||||
To query based on a given key, you simply use that key as the lookup name::
|
||||
To query based on a given key, you can use that key as the lookup name::
|
||||
|
||||
>>> Dog.objects.create(name='Rufus', data={'breed': 'labrador'})
|
||||
>>> Dog.objects.create(name='Meg', data={'breed': 'collie'})
|
||||
|
@ -537,8 +537,7 @@ We will use the following example model::
|
|||
Key, index, and path lookups
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
To query based on a given dictionary key, simply use that key as the lookup
|
||||
name::
|
||||
To query based on a given dictionary key, use that key as the lookup name::
|
||||
|
||||
>>> Dog.objects.create(name='Rufus', data={
|
||||
... 'breed': 'labrador',
|
||||
|
|
|
@ -15,8 +15,7 @@ Fields
|
|||
|
||||
.. class:: SimpleArrayField(base_field, delimiter=',', max_length=None, min_length=None)
|
||||
|
||||
A simple field which maps to an array. It is represented by an HTML
|
||||
``<input>``.
|
||||
A field which maps to an array. It is represented by an HTML ``<input>``.
|
||||
|
||||
.. attribute:: base_field
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ The ``search`` lookup
|
|||
|
||||
.. fieldlookup:: search
|
||||
|
||||
The simplest way to use full text search is to search a single term against a
|
||||
A common way to use full text search is to search a single term against a
|
||||
single column in the database. For example::
|
||||
|
||||
>>> Entry.objects.filter(body_text__search='Cheese')
|
||||
|
@ -111,9 +111,9 @@ See :ref:`postgresql-fts-search-configuration` for an explanation of the
|
|||
|
||||
.. class:: SearchRank(vector, query, weights=None)
|
||||
|
||||
So far, we've just returned the results for which any match between the vector
|
||||
and the query are possible. It's likely you may wish to order the results by
|
||||
some sort of relevancy. PostgreSQL provides a ranking function which takes into
|
||||
So far, we've returned the results for which any match between the vector and
|
||||
the query are possible. It's likely you may wish to order the results by some
|
||||
sort of relevancy. PostgreSQL provides a ranking function which takes into
|
||||
account how often the query terms appear in the document, how close together
|
||||
the terms are in the document, and how important the part of the document is
|
||||
where they occur. The better the match, the higher the value of the rank. To
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue