From b7b7a4c13b6be2526c5b7c75b8fcc12e1524dec1 Mon Sep 17 00:00:00 2001
From: Derek Willis <dwillis@gmail.com>
Date: Fri, 12 Feb 2010 22:53:40 -0500
Subject: [PATCH] removed references to lede
---
docs/ref/models/querysets.txt | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt
index db2fa56..f0eceb1 100644
a
|
b
|
the database.
|
820 | 820 | |
821 | 821 | This is done by passing the names of the fields to not load to ``defer()``:: |
822 | 822 | |
823 | | Entry.objects.defer("lede", "body") |
| 823 | Entry.objects.defer("headline", "body") |
824 | 824 | |
825 | 825 | A queryset that has deferred fields will still return model instances. Each |
826 | 826 | deferred field will be retrieved from the database if you access that field |
… |
… |
You can make multiple calls to ``defer()``. Each call adds new fields to the
|
830 | 830 | deferred set:: |
831 | 831 | |
832 | 832 | # Defers both the body and lede fields. |
833 | | Entry.objects.defer("body").filter(headline="Lennon").defer("lede") |
| 833 | Entry.objects.defer("body").filter(rating=5).defer("headline") |
834 | 834 | |
835 | 835 | The order in which fields are added to the deferred set does not matter. Calling ``defer()`` with a field name that has already been deferred is harmless (the field will still be deferred). |
836 | 836 | |
… |
… |
You can defer loading of fields in related models (if the related models are
|
838 | 838 | loading via ``select_related()``) by using the standard double-underscore |
839 | 839 | notation to separate related fields:: |
840 | 840 | |
841 | | Blog.objects.select_related().defer("entry__lede", "entry__body") |
| 841 | Blog.objects.select_related().defer("entry__headline", "entry__body") |
842 | 842 | |
843 | 843 | If you want to clear the set of deferred fields, pass ``None`` as a parameter |
844 | 844 | to ``defer()``:: |