Skip to content

Commit b97ea85

Browse files
cliff688sarahboyce
andauthored
Apply suggestions from Sarah's review
Co-authored-by: Sarah Boyce <[email protected]>
1 parent cd60a67 commit b97ea85

File tree

6 files changed

+12
-14
lines changed

6 files changed

+12
-14
lines changed

docs/ref/models/meta.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ Retrieving a single field instance of a model by name
3838
set by the user, the :attr:`~.ForeignKey.related_name` set by the user, or
3939
the name automatically generated by Django.
4040

41-
Hidden fields (:attr:`hidden=True <django.db.models.Field.hidden>`) cannot
42-
be retrieved by name.
41+
Hidden fields, fields with :attr:`hidden=True
42+
<django.db.models.Field.hidden>`, cannot be retrieved by name.
4343

4444
If a field with the given name is not found a
4545
:class:`~django.core.exceptions.FieldDoesNotExist` exception will be
@@ -80,7 +80,7 @@ Retrieving all field instances of a model
8080

8181
``include_hidden``
8282
``False`` by default. If set to ``True``, ``get_fields()`` will include
83-
fields with :attr:`hidden=True<django.db.models.Field.hidden>`.
83+
fields with :attr:`hidden=True <django.db.models.Field.hidden>`.
8484

8585
.. code-block:: pycon
8686

@@ -129,9 +129,8 @@ Retrieving fields composing the primary key of a model
129129

130130
Returns a list of the fields composing the primary key of a model.
131131

132-
When a :class:`~django.db.models.CompositePrimaryKey` is defined on a
133-
model it will contain all the :doc:`fields </ref/models/fields>`
134-
referenced by it.
132+
When a :class:`~django.db.models.CompositePrimaryKey` is defined on a model
133+
it will contain all the fields referenced by it.
135134

136135
.. code-block:: python
137136

docs/ref/settings.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -463,10 +463,9 @@ A list of trusted origins for unsafe requests (e.g. ``POST``).
463463
For requests that include the ``Origin`` header, Django's CSRF protection
464464
requires that header match the origin present in the ``Host`` header.
465465

466-
For a secure, unsafe request -- where "secure" is determined by
467-
:meth:`~django.http.HttpRequest.is_secure` -- that doesn't include the
468-
``Origin`` header, the request must include a ``Referer`` header that
469-
matches the origin in the ``Host`` header.
466+
For a secure (determined by :meth:`~django.http.HttpRequest.is_secure`) unsafe
467+
request that doesn't include the ``Origin`` header, the request must include a
468+
``Referer`` header that matches the origin in the ``Host`` header.
470469

471470
These checks prevent, for example, a ``POST`` request from
472471
``subdomain.example.com`` from succeeding against ``api.example.com``. If you

docs/topics/class-based-views/mixins.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ To make a :class:`~django.template.response.TemplateResponse`,
161161
:class:`ListView` then uses
162162
:class:`~django.views.generic.list.MultipleObjectTemplateResponseMixin`;
163163
as with :class:`~django.views.generic.detail.SingleObjectTemplateResponseMixin`
164-
above, this implements
164+
above, this overrides
165165
:meth:`~django.views.generic.list.MultipleObjectTemplateResponseMixin.get_template_names`
166166
to provide a range of options with the most commonly-used being
167167
``<app_label>/<model_name>_list.html``, with the ``_list`` part again

docs/topics/db/optimization.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ number of SQL queries. For example::
378378
Entry.objects.create(headline="This is only a test")
379379

380380
Note that :meth:`~django.db.models.query.QuerySet.bulk_create` has several
381-
caveats (see its documentation), so ensure it's appropriate for your use case.
381+
caveats, so ensure it's appropriate for your use case.
382382

383383
Update in bulk
384384
--------------

docs/topics/db/queries.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1372,7 +1372,7 @@ Keyword argument queries -- in :meth:`~django.db.models.query.QuerySet.filter`,
13721372
etc. -- are "AND"ed together. If you need to execute more complex queries (for
13731373
example, queries with ``OR`` statements), you can use :ref:`q-objects`.
13741374

1375-
A :class:`~django.db.models.Q` object (``django.db.models.Q``) is an object
1375+
A :ref:`Q object <q-objects>` (``django.db.models.Q``) is an object used to
13761376
used to encapsulate a collection of keyword arguments. These keyword arguments
13771377
are specified as in "Field lookups" above.
13781378

docs/topics/forms/modelforms.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ Considerations regarding model's ``error_messages``
298298
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
299299

300300
Error messages defined at the form field level (
301-
:attr:`django.forms.Field.error_messages`) level or at the
301+
:attr:`django.forms.Field.error_messages`) or at the
302302
:ref:`form Meta <modelforms-overriding-default-fields>` level always take
303303
precedence over the error messages defined at the model field level
304304
(:attr:`django.db.models.Field.error_messages`).

0 commit comments

Comments
 (0)