summaryrefslogtreecommitdiff
path: root/docs/topics
diff options
context:
space:
mode:
authorJannis Leidel <jannis@leidel.info>2011-09-30 10:28:39 +0000
committerJannis Leidel <jannis@leidel.info>2011-09-30 10:28:39 +0000
commit2eadc418aff64790eb5b8d06ac995c720c233e49 (patch)
tree054fbd3dd8742e4aed3100c015e564318c2a77db /docs/topics
parentec5bfed57ad86ec17a9169c279c967abbfbe52f9 (diff)
Fixed doc references to `django.db.models.query.QuerySet` and converted some tabs that were introduced in r16699 to spaces.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16915 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/topics')
-rw-r--r--docs/topics/db/aggregation.txt8
-rw-r--r--docs/topics/db/optimization.txt13
-rw-r--r--docs/topics/db/queries.txt2
-rw-r--r--docs/topics/db/sql.txt4
-rw-r--r--docs/topics/serialization.txt7
5 files changed, 18 insertions, 16 deletions
diff --git a/docs/topics/db/aggregation.txt b/docs/topics/db/aggregation.txt
index 8267c27778..faf8fe32f0 100644
--- a/docs/topics/db/aggregation.txt
+++ b/docs/topics/db/aggregation.txt
@@ -349,10 +349,10 @@ 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
-: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.
+:meth:`~django.db.models.query.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.
.. note::
You might reasonably ask why Django doesn't remove the extraneous columns
diff --git a/docs/topics/db/optimization.txt b/docs/topics/db/optimization.txt
index 5093917b61..3982ebd4f5 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 behavior of the ``QuerySet`` can
cause a large amount of memory to be used. In this case,
-:meth:`~django.db.models.QuerySet.iterator()` may help.
+:meth:`~django.db.models.query.QuerySet.iterator()` may help.
Do database work in the database rather than in Python
======================================================
@@ -122,7 +122,7 @@ Use ``QuerySet.extra()``
------------------------
A less portable but more powerful method is
-:meth:`~django.db.models.QuerySet.extra()`, which allows some SQL to be
+:meth:`~django.db.models.query.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,8 @@ Use ``QuerySet.values()`` and ``values_list()``
-----------------------------------------------
When you just want a ``dict`` or ``list`` of values, and don't need ORM model
-objects, make appropriate usage of :meth:`~django.db.models.QuerySet.values()`.
+objects, make appropriate usage of
+:meth:`~django.db.models.query.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,9 +168,9 @@ you are fine.
Use ``QuerySet.defer()`` and ``only()``
---------------------------------------
-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
+Use :meth:`~django.db.models.query.QuerySet.defer()` and
+:meth:`~django.db.models.query.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/queries.txt b/docs/topics/db/queries.txt
index 23ed124fa5..e499b71502 100644
--- a/docs/topics/db/queries.txt
+++ b/docs/topics/db/queries.txt
@@ -346,7 +346,7 @@ This is roughly equivalent to::
Note, however, that the first of these will raise ``IndexError`` while the
second will raise ``DoesNotExist`` if no objects match the given criteria. See
-:meth:`~django.db.models.QuerySet.get` for more details.
+:meth:`~django.db.models.query.QuerySet.get` for more details.
.. _field-lookups-intro:
diff --git a/docs/topics/db/sql.txt b/docs/topics/db/sql.txt
index 9527860f78..80038e547f 100644
--- a/docs/topics/db/sql.txt
+++ b/docs/topics/db/sql.txt
@@ -124,8 +124,8 @@ 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 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::
+(see :meth:`~django.db.models.query.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
diff --git a/docs/topics/serialization.txt b/docs/topics/serialization.txt
index f0f17b2ee2..b23fd7f94e 100644
--- a/docs/topics/serialization.txt
+++ b/docs/topics/serialization.txt
@@ -21,9 +21,10 @@ At the highest level, serializing data is a very simple operation::
data = serializers.serialize("xml", SomeModel.objects.all())
The arguments to the ``serialize`` function are the format to serialize the data
-to (see `Serialization formats`_) and a :class:`~django.db.models.QuerySet` to
-serialize. (Actually, the second argument can be any iterator that yields Django
-objects, but it'll almost always be a QuerySet).
+to (see `Serialization formats`_) and a
+:class:`~django.db.models.query.QuerySet` to serialize. (Actually, the second
+argument can be any iterator that yields Django objects, but it'll almost
+always be a QuerySet).
You can also use a serializer object directly::