summaryrefslogtreecommitdiff
path: root/docs/topics/db
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-12-27 09:58:42 -0500
committerTim Graham <timograham@gmail.com>2016-12-27 09:59:07 -0500
commite2d02c1fc99d8d85ec2a13a745cb786a15a5c6b2 (patch)
tree6c2bfa39d2a641b09622ec412492e9689e599767 /docs/topics/db
parent4a51ba228b2c416a115aee3bc034683eb02482c3 (diff)
Used a nontemporal example in QuerySet.bulk_create() in docs.
Diffstat (limited to 'docs/topics/db')
-rw-r--r--docs/topics/db/optimization.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/topics/db/optimization.txt b/docs/topics/db/optimization.txt
index 446ec87256..66326f2fb1 100644
--- a/docs/topics/db/optimization.txt
+++ b/docs/topics/db/optimization.txt
@@ -339,14 +339,14 @@ When creating objects, where possible, use the
number of SQL queries. For example::
Entry.objects.bulk_create([
- Entry(headline="Python 3.0 Released"),
- Entry(headline="Python 3.1 Planned")
+ Entry(headline='This is a test'),
+ Entry(headline='This is only a test'),
])
...is preferable to::
- Entry.objects.create(headline="Python 3.0 Released")
- Entry.objects.create(headline="Python 3.1 Planned")
+ Entry.objects.create(headline='This is a test')
+ Entry.objects.create(headline='This is only a test')
Note that there are a number of :meth:`caveats to this method
<django.db.models.query.QuerySet.bulk_create>`, so make sure it's appropriate