diff --git a/docs/topics/db/optimization.txt b/docs/topics/db/optimization.txt index baea968fdb..067bc78c42 100644 --- a/docs/topics/db/optimization.txt +++ b/docs/topics/db/optimization.txt @@ -283,21 +283,23 @@ number of SQL queries. For example:: Entry(headline="Python 3.1 Planned") ]) -Is preferable to:: +...is preferable to:: Entry.objects.create(headline="Python 3.0 Released") Entry.objects.create(headline="Python 3.1 Planned") Note that there are a number of :meth:`caveats to this method -`, make sure it is appropriate for -your use case. This also applies to :class:`ManyToManyFields -`, doing:: +`, so make sure it's appropriate +for your use case. + +This also applies to :class:`ManyToManyFields +`, so doing:: my_band.members.add(me, my_friend) -Is preferable to:: +...is preferable to:: my_band.members.add(me) my_band.members.add(my_friend) -Where ``Bands`` and ``Artists`` have a many-to-many relationship. +...where ``Bands`` and ``Artists`` have a many-to-many relationship.