From 1024b5e74a7166313ad4e4975a15e90dccd3ec5f Mon Sep 17 00:00:00 2001 From: David Smith Date: Fri, 23 Jul 2021 07:48:16 +0100 Subject: Fixed 32956 -- Lowercased spelling of "web" and "web framework" where appropriate. --- docs/topics/db/examples/many_to_many.txt | 26 +++++++++++++------------- docs/topics/db/optimization.txt | 4 ++-- docs/topics/db/queries.txt | 4 ++-- 3 files changed, 17 insertions(+), 17 deletions(-) (limited to 'docs/topics/db') diff --git a/docs/topics/db/examples/many_to_many.txt b/docs/topics/db/examples/many_to_many.txt index 752abe9f72..f53f3c131a 100644 --- a/docs/topics/db/examples/many_to_many.txt +++ b/docs/topics/db/examples/many_to_many.txt @@ -47,14 +47,14 @@ Create a few ``Publications``:: Create an ``Article``:: - >>> a1 = Article(headline='Django lets you build Web apps easily') + >>> a1 = Article(headline='Django lets you build web apps easily') You can't associate it with a ``Publication`` until it's been saved:: >>> a1.publications.add(p1) Traceback (most recent call last): ... - ValueError: "" needs to have a value for field "id" before this many-to-many relationship can be used. + ValueError: "" needs to have a value for field "id" before this many-to-many relationship can be used. Save it! :: @@ -100,7 +100,7 @@ Create and add a ``Publication`` to an ``Article`` in one step using >>> p2.article_set.all() ]> >>> p1.article_set.all() - , ]> + , ]> >>> Publication.objects.get(id=4).article_set.all() ]> @@ -108,13 +108,13 @@ Many-to-many relationships can be queried using :ref:`lookups across relationships `:: >>> Article.objects.filter(publications__id=1) - , ]> + , ]> >>> Article.objects.filter(publications__pk=1) - , ]> + , ]> >>> Article.objects.filter(publications=1) - , ]> + , ]> >>> Article.objects.filter(publications=p1) - , ]> + , ]> >>> Article.objects.filter(publications__title__startswith="Science") , ]> @@ -132,9 +132,9 @@ The :meth:`~django.db.models.query.QuerySet.count` function respects 1 >>> Article.objects.filter(publications__in=[1,2]).distinct() - , ]> + , ]> >>> Article.objects.filter(publications__in=[p1,p2]).distinct() - , ]> + , ]> Reverse m2m queries are supported (i.e., starting at the table that doesn't have a :class:`~django.db.models.ManyToManyField`):: @@ -165,7 +165,7 @@ Excluding a related item works as you would expect, too (although the SQL involved is a little complex):: >>> Article.objects.exclude(publications=p2) - ]> + ]> If we delete a ``Publication``, its ``Articles`` won't be able to access it:: @@ -180,7 +180,7 @@ If we delete an ``Article``, its ``Publications`` won't be able to access it:: >>> a2.delete() >>> Article.objects.all() - ]> + ]> >>> p2.article_set.all() @@ -261,7 +261,7 @@ go:: >>> Publication.objects.all() , ]> >>> Article.objects.all() - , , , ]> + , , , ]> >>> a2.publications.all() ]> @@ -269,7 +269,7 @@ Bulk delete some articles - references to deleted objects should go:: >>> q = Article.objects.filter(headline__startswith='Django') >>> print(q) - ]> + ]> >>> q.delete() After the :meth:`~django.db.models.query.QuerySet.delete`, the diff --git a/docs/topics/db/optimization.txt b/docs/topics/db/optimization.txt index 180cd60a46..c9a0396b89 100644 --- a/docs/topics/db/optimization.txt +++ b/docs/topics/db/optimization.txt @@ -81,7 +81,7 @@ Understand cached attributes As well as caching of the whole ``QuerySet``, there is caching of the result of attributes on ORM objects. In general, attributes that are not callable will be -cached. For example, assuming the :ref:`example Weblog models +cached. For example, assuming the :ref:`example blog models `:: >>> entry = Entry.objects.get(id=1) @@ -164,7 +164,7 @@ First, the query will be quicker because of the underlying database index. Also, the query could run much slower if multiple objects match the lookup; having a unique constraint on the column guarantees this will never happen. -So using the :ref:`example Weblog models `:: +So using the :ref:`example blog models `:: >>> entry = Entry.objects.get(id=10) diff --git a/docs/topics/db/queries.txt b/docs/topics/db/queries.txt index f06dd21680..ac425e99f4 100644 --- a/docs/topics/db/queries.txt +++ b/docs/topics/db/queries.txt @@ -11,7 +11,7 @@ API. Refer to the :doc:`data model reference ` for full details of all the various model lookup options. Throughout this guide (and in the reference), we'll refer to the following -models, which comprise a Weblog application: +models, which comprise a blog application: .. _queryset-model-example: @@ -1181,7 +1181,7 @@ object and returns the number of objects deleted and a dictionary with the number of deletions per object type. Example:: >>> e.delete() - (1, {'weblog.Entry': 1}) + (1, {'blog.Entry': 1}) You can also delete objects in bulk. Every :class:`~django.db.models.query.QuerySet` has a -- cgit v1.3