Index: docs/topics/db/optimization.txt
===================================================================
--- docs/topics/db/optimization.txt (revision 13301)
+++ docs/topics/db/optimization.txt (working copy)
@@ -101,7 +101,7 @@
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() ` may help.
+:meth:`~django.db.models.QuerySet.iterator()` may help.
Do database work in the database rather than in Python
======================================================
@@ -122,9 +122,9 @@
Use ``QuerySet.extra()``
------------------------
-A less portable but more powerful method is :ref:`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
-----------
@@ -160,7 +160,7 @@
-----------------------------------------------
When you just want a dict/list of values, and don't need ORM model objects, make
-appropriate usage of :ref:`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.
@@ -168,7 +168,8 @@
Use ``QuerySet.defer()`` and ``only()``
---------------------------------------
-Use :ref:`defer() and only() ` 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.
Index: docs/topics/db/aggregation.txt
===================================================================
--- docs/topics/db/aggregation.txt (revision 13301)
+++ docs/topics/db/aggregation.txt (working copy)
@@ -353,7 +353,7 @@
query.
This behavior is the same as that noted in the queryset documentation for
-:ref:`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.
Index: docs/topics/db/sql.txt
===================================================================
--- docs/topics/db/sql.txt (revision 13301)
+++ docs/topics/db/sql.txt (working copy)
@@ -116,9 +116,9 @@
>>> people = Person.objects.raw('SELECT id, first_name FROM myapp_person')
-The ``Person`` objects returned by this query will be :ref:`deferred
-` 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
Index: docs/releases/1.1-beta-1.txt
===================================================================
--- docs/releases/1.1-beta-1.txt (revision 13301)
+++ docs/releases/1.1-beta-1.txt (working copy)
@@ -71,8 +71,9 @@
particular fields, you can now tell Django not to retrieve them from the
database.
-You'll do this with the :ref:`new queryset methods `
-``defer()`` and ``only()``.
+You'll do this with the new queryset methods
+:meth:`~django.db.models.QuerySet.defer` and
+:meth:`~django.db.models.QuerySet.only`.
New admin features
------------------
Index: docs/releases/1.1.txt
===================================================================
--- docs/releases/1.1.txt (revision 13301)
+++ docs/releases/1.1.txt (working copy)
@@ -258,8 +258,9 @@
particular fields, you can now tell Django not to retrieve them from the
database.
-You'll do this with the :ref:`new queryset methods `
-``defer()`` and ``only()``.
+You'll do this with the new queryset methods
+:meth:`~django.db.models.QuerySet.defer` and
+:meth:`~django.db.models.QuerySet.only`.
Testing improvements
--------------------
Index: docs/ref/models/querysets.txt
===================================================================
--- docs/ref/models/querysets.txt (revision 13301)
+++ docs/ref/models/querysets.txt (working copy)
@@ -332,8 +332,6 @@
ordering was undefined prior to calling ``reverse()``, and will remain
undefined afterward).
-.. _queryset-distinct:
-
``distinct()``
~~~~~~~~~~~~~~
@@ -367,9 +365,6 @@
``values()`` together, be careful when ordering by fields not in the
``values()`` call.
-
-.. _queryset-values:
-
``values(*fields)``
~~~~~~~~~~~~~~~~~~~
@@ -679,8 +674,6 @@
``OneToOneFields`` will not be traversed in the reverse direction if you
are performing a depth-based ``select_related``.
-.. _queryset-extra:
-
``extra(select=None, where=None, params=None, tables=None, order_by=None, select_params=None)``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -843,8 +836,6 @@
Entry.objects.extra(where=['headline=%s'], params=['Lennon'])
-.. _queryset-defer:
-
``defer(*fields)``
~~~~~~~~~~~~~~~~~~
@@ -1143,8 +1134,6 @@
If you pass ``in_bulk()`` an empty list, you'll get an empty dictionary.
-.. _queryset-iterator:
-
``iterator()``
~~~~~~~~~~~~~~
Index: docs/ref/contrib/admin/index.txt
===================================================================
--- docs/ref/contrib/admin/index.txt (revision 13301)
+++ docs/ref/contrib/admin/index.txt (working copy)
@@ -474,18 +474,17 @@
.. attribute:: ModelAdmin.list_select_related
-Set ``list_select_related`` to tell Django to use ``select_related()`` in
-retrieving the list of objects on the admin change list page. This can save you
-a bunch of database queries.
+Set ``list_select_related`` to tell Django to use
+:meth:`~django.db.models.QuerySet.select_related` in retrieving the list of
+objects on the admin change list page. This can save you a bunch of database
+queries.
The value should be either ``True`` or ``False``. Default is ``False``.
-Note that Django will use ``select_related()``, regardless of this setting,
-if one of the ``list_display`` fields is a ``ForeignKey``.
+Note that Django will use :meth:`~django.db.models.QuerySet.select_related`,
+regardless of this setting, if one of the ``list_display`` fields is a
+``ForeignKey``.
-For more on ``select_related()``, see
-:ref:`the select_related() docs `.
-
.. attribute:: ModelAdmin.inlines
See ``InlineModelAdmin`` objects below.