summaryrefslogtreecommitdiff
path: root/docs/topics
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2010-08-07 14:26:07 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2010-08-07 14:26:07 +0000
commit2dc2ed87e5bbf993b2189f33cc0310521dbc8801 (patch)
tree71d04e01954a91ef5cddbbb126af33739d44f46e /docs/topics
parent973fb63e4f4a2d07cf14cf117175cece71f0a8da (diff)
Fixed #11800 -- Updated Sphinx metadata in queryset docs. Thanks to timo for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13548 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/topics')
-rw-r--r--docs/topics/db/aggregation.txt2
-rw-r--r--docs/topics/db/optimization.txt13
-rw-r--r--docs/topics/db/sql.txt6
3 files changed, 11 insertions, 10 deletions
diff --git a/docs/topics/db/aggregation.txt b/docs/topics/db/aggregation.txt
index 087c1bf239..41580c94b6 100644
--- a/docs/topics/db/aggregation.txt
+++ b/docs/topics/db/aggregation.txt
@@ -353,7 +353,7 @@ without any harmful effects, since that is already playing a role in the
query.
This behavior is the same as that noted in the queryset documentation for
-:ref:`distinct() <queryset-distinct>` and the general rule is the same:
+:meth:`~django.db.models.QuerySet.distinct` and the general rule is the same:
normally you won't want extra columns playing a part in the result, so clear
out the ordering, or at least make sure it's restricted only to those fields
you also select in a ``values()`` call.
diff --git a/docs/topics/db/optimization.txt b/docs/topics/db/optimization.txt
index 5d74fc9ce9..bb40139f23 100644
--- a/docs/topics/db/optimization.txt
+++ b/docs/topics/db/optimization.txt
@@ -101,7 +101,7 @@ Use ``iterator()``
When you have a lot of objects, the caching behaviour of the ``QuerySet`` can
cause a large amount of memory to be used. In this case,
-:ref:`QuerySet.iterator() <queryset-iterator>` may help.
+:meth:`~django.db.models.QuerySet.iterator()` may help.
Do database work in the database rather than in Python
======================================================
@@ -121,9 +121,9 @@ If these aren't enough to generate the SQL you need:
Use ``QuerySet.extra()``
------------------------
-A less portable but more powerful method is :ref:`QuerySet.extra()
-<queryset-extra>`, which allows some SQL to be explicitly added to the query.
-If that still isn't powerful enough:
+A less portable but more powerful method is
+:meth:`~django.db.models.QuerySet.extra()`, which allows some SQL to be
+explicitly added to the query. If that still isn't powerful enough:
Use raw SQL
-----------
@@ -159,7 +159,7 @@ Use ``QuerySet.values()`` and ``values_list()``
-----------------------------------------------
When you just want a dict/list of values, and don't need ORM model objects, make
-appropriate usage of :ref:`QuerySet.values() <queryset-values>`.
+appropriate usage of :meth:`~django.db.models.QuerySet.values()`.
These can be useful for replacing model objects in template code - as long as
the dicts you supply have the same attributes as those used in the template, you
are fine.
@@ -167,7 +167,8 @@ are fine.
Use ``QuerySet.defer()`` and ``only()``
---------------------------------------
-Use :ref:`defer() and only() <queryset-defer>` if there are database columns you
+Use :meth:`~django.db.models.QuerySet.defer()` and
+:meth:`~django.db.models.QuerySet.only()` if there are database columns you
know that you won't need (or won't need in most cases) to avoid loading
them. Note that if you *do* use them, the ORM will have to go and get them in a
separate query, making this a pessimization if you use it inappropriately.
diff --git a/docs/topics/db/sql.txt b/docs/topics/db/sql.txt
index f55a164373..c3272da757 100644
--- a/docs/topics/db/sql.txt
+++ b/docs/topics/db/sql.txt
@@ -116,9 +116,9 @@ Fields may also be left out::
>>> people = Person.objects.raw('SELECT id, first_name FROM myapp_person')
-The ``Person`` objects returned by this query will be :ref:`deferred
-<queryset-defer>` model instances. This means that the fields that are omitted
-from the query will be loaded on demand. For example::
+The ``Person`` objects returned by this query will be deferred model instances
+(see :meth:`~django.db.models.QuerySet.defer()`). This means that the fields
+that are omitted from the query will be loaded on demand. For example::
>>> for p in Person.objects.raw('SELECT id, first_name FROM myapp_person'):
... print p.first_name, # This will be retrieved by the original query