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 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'docs/topics/db/examples') 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 -- cgit v1.3