Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #11800 -- Updated Sphinx metadata in queryset docs. Thanks to t…

…imo for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13548 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 2dc2ed87e5bbf993b2189f33cc0310521dbc8801 1 parent 973fb63
Russell Keith-Magee authored August 07, 2010
15  docs/ref/contrib/admin/index.txt
@@ -474,17 +474,16 @@ change list page. By default, this is set to ``100``.
474 474
 
475 475
 .. attribute:: ModelAdmin.list_select_related
476 476
 
477  
-Set ``list_select_related`` to tell Django to use ``select_related()`` in
478  
-retrieving the list of objects on the admin change list page. This can save you
479  
-a bunch of database queries.
  477
+Set ``list_select_related`` to tell Django to use
  478
+:meth:`~django.db.models.QuerySet.select_related` in retrieving the list of
  479
+objects on the admin change list page. This can save you a bunch of database
  480
+queries.
480 481
 
481 482
 The value should be either ``True`` or ``False``. Default is ``False``.
482 483
 
483  
-Note that Django will use ``select_related()``, regardless of this setting,
484  
-if one of the ``list_display`` fields is a ``ForeignKey``.
485  
-
486  
-For more on ``select_related()``, see
487  
-:ref:`the select_related() docs <select-related>`.
  484
+Note that Django will use :meth:`~django.db.models.QuerySet.select_related`,
  485
+regardless of this setting, if one of the ``list_display`` fields is a
  486
+``ForeignKey``.
488 487
 
489 488
 .. attribute:: ModelAdmin.inlines
490 489
 
11  docs/ref/models/querysets.txt
@@ -332,8 +332,6 @@ a model which defines a default ordering, or when using
332 332
 ordering was undefined prior to calling ``reverse()``, and will remain
333 333
 undefined afterward).
334 334
 
335  
-.. _queryset-distinct:
336  
-
337 335
 ``distinct()``
338 336
 ~~~~~~~~~~~~~~
339 337
 
@@ -367,9 +365,6 @@ query spans multiple tables, it's possible to get duplicate results when a
367 365
     ``values()`` together, be careful when ordering by fields not in the
368 366
     ``values()`` call.
369 367
 
370  
-
371  
-.. _queryset-values:
372  
-
373 368
 ``values(*fields)``
374 369
 ~~~~~~~~~~~~~~~~~~~
375 370
 
@@ -679,8 +674,6 @@ related object.
679 674
 ``OneToOneFields`` will not be traversed in the reverse direction if you
680 675
 are performing a depth-based ``select_related``.
681 676
 
682  
-.. _queryset-extra:
683  
-
684 677
 ``extra(select=None, where=None, params=None, tables=None, order_by=None, select_params=None)``
685 678
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
686 679
 
@@ -843,8 +836,6 @@ of the arguments is required, but you should use at least one of them.
843 836
 
844 837
         Entry.objects.extra(where=['headline=%s'], params=['Lennon'])
845 838
 
846  
-.. _queryset-defer:
847  
-
848 839
 ``defer(*fields)``
849 840
 ~~~~~~~~~~~~~~~~~~
850 841
 
@@ -1143,8 +1134,6 @@ Example::
1143 1134
 
1144 1135
 If you pass ``in_bulk()`` an empty list, you'll get an empty dictionary.
1145 1136
 
1146  
-.. _queryset-iterator:
1147  
-
1148 1137
 ``iterator()``
1149 1138
 ~~~~~~~~~~~~~~
1150 1139
 
23  docs/releases/1.1-beta-1.txt
@@ -71,8 +71,9 @@ processing to convert them to Python objects. If you know you don't need those
71 71
 particular fields, you can now tell Django not to retrieve them from the
72 72
 database.
73 73
 
74  
-You'll do this with the :ref:`new queryset methods <queryset-defer>`
75  
-``defer()`` and ``only()``.
  74
+You'll do this with the new queryset methods
  75
+:meth:`~django.db.models.QuerySet.defer` and
  76
+:meth:`~django.db.models.QuerySet.only`.
76 77
 
77 78
 New admin features
78 79
 ------------------
@@ -108,13 +109,13 @@ A couple of small but very useful improvements have been made to the
108 109
     * The test :class:`Client` now can automatically follow redirects with the
109 110
       ``follow`` argument to :meth:`Client.get` and :meth:`Client.post`. This
110 111
       makes testing views that issue redirects simpler.
111  
-      
  112
+
112 113
     * It's now easier to get at the template context in the response returned
113 114
       the test client: you'll simply access the context as
114 115
       ``request.context[key]``. The old way, which treats ``request.context``
115 116
       as a list of contexts, one for each rendered template, is still
116 117
       available if you need it.
117  
-      
  118
+
118 119
 Conditional view processing
119 120
 ---------------------------
120 121
 
@@ -133,23 +134,23 @@ release, including:
133 134
     * The :djadmin:`dumpdata` management command now accepts individual
134 135
       model names as arguments, allowing you to export the data just from
135 136
       particular models.
136  
-      
  137
+
137 138
     * There's a new :tfilter:`safeseq` template filter which works just like
138 139
       :tfilter:`safe` for lists, marking each item in the list as safe.
139  
-      
  140
+
140 141
     * :ref:`Cache backends <topics-cache>` now support ``incr()`` and
141 142
       ``decr()`` commands to increment and decrement the value of a cache key.
142 143
       On cache backends that support atomic increment/decrement -- most
143 144
       notably, the memcached backend -- these operations will be atomic, and
144 145
       quite fast.
145  
-      
  146
+
146 147
     * Django now can :ref:`easily delegate authentication to the web server
147 148
       <howto-auth-remote-user>` via a new authentication backend that supports
148 149
       the standard ``REMOTE_USER`` environment variable used for this purpose.
149  
-      
  150
+
150 151
     * There's a new :func:`django.shortcuts.redirect` function that makes it
151 152
       easier to issue redirects given an object, a view name, or a URL.
152  
-      
  153
+
153 154
     * The ``postgresql_psycopg2`` backend now supports :ref:`native PostgreSQL
154 155
       autocommit <postgresql-notes>`. This is an advanced, PostgreSQL-specific
155 156
       feature, that can make certain read-heavy applications a good deal
@@ -183,7 +184,7 @@ central place to search for open issues:
183 184
     * http://code.djangoproject.com/timeline
184 185
 
185 186
 Please open new tickets if no existing ticket corresponds to a problem you're
186  
-running into. 
  187
+running into.
187 188
 
188 189
 Additionally, discussion of Django development, including progress toward the
189 190
 1.1 release, takes place daily on the django-developers mailing list:
@@ -195,7 +196,7 @@ interested in helping out with Django's development, feel free to join the
195 196
 discussions there.
196 197
 
197 198
 Django's online documentation also includes pointers on how to contribute to
198  
-Django: 
  199
+Django:
199 200
 
200 201
     * :ref:`How to contribute to Django <internals-contributing>`
201 202
 
5  docs/releases/1.1.txt
@@ -258,8 +258,9 @@ processing to convert them to Python objects. If you know you don't need those
258 258
 particular fields, you can now tell Django not to retrieve them from the
259 259
 database.
260 260
 
261  
-You'll do this with the :ref:`new queryset methods <queryset-defer>`
262  
-``defer()`` and ``only()``.
  261
+You'll do this with the new queryset methods
  262
+:meth:`~django.db.models.QuerySet.defer` and
  263
+:meth:`~django.db.models.QuerySet.only`.
263 264
 
264 265
 Testing improvements
265 266
 --------------------
2  docs/topics/db/aggregation.txt
@@ -353,7 +353,7 @@ without any harmful effects, since that is already playing a role in the
353 353
 query.
354 354
 
355 355
 This behavior is the same as that noted in the queryset documentation for
356  
-:ref:`distinct() <queryset-distinct>` and the general rule is the same:
  356
+:meth:`~django.db.models.QuerySet.distinct` and the general rule is the same:
357 357
 normally you won't want extra columns playing a part in the result, so clear
358 358
 out the ordering, or at least make sure it's restricted only to those fields
359 359
 you also select in a ``values()`` call.
13  docs/topics/db/optimization.txt
@@ -101,7 +101,7 @@ Use ``iterator()``
101 101
 
102 102
 When you have a lot of objects, the caching behaviour of the ``QuerySet`` can
103 103
 cause a large amount of memory to be used. In this case,
104  
-:ref:`QuerySet.iterator() <queryset-iterator>` may help.
  104
+:meth:`~django.db.models.QuerySet.iterator()` may help.
105 105
 
106 106
 Do database work in the database rather than in Python
107 107
 ======================================================
@@ -121,9 +121,9 @@ If these aren't enough to generate the SQL you need:
121 121
 Use ``QuerySet.extra()``
122 122
 ------------------------
123 123
 
124  
-A less portable but more powerful method is :ref:`QuerySet.extra()
125  
-<queryset-extra>`, which allows some SQL to be explicitly added to the query.
126  
-If that still isn't powerful enough:
  124
+A less portable but more powerful method is
  125
+:meth:`~django.db.models.QuerySet.extra()`, which allows some SQL to be
  126
+explicitly added to the query. If that still isn't powerful enough:
127 127
 
128 128
 Use raw SQL
129 129
 -----------
@@ -159,7 +159,7 @@ Use ``QuerySet.values()`` and ``values_list()``
159 159
 -----------------------------------------------
160 160
 
161 161
 When you just want a dict/list of values, and don't need ORM model objects, make
162  
-appropriate usage of :ref:`QuerySet.values() <queryset-values>`.
  162
+appropriate usage of :meth:`~django.db.models.QuerySet.values()`.
163 163
 These can be useful for replacing model objects in template code - as long as
164 164
 the dicts you supply have the same attributes as those used in the template, you
165 165
 are fine.
@@ -167,7 +167,8 @@ are fine.
167 167
 Use ``QuerySet.defer()`` and ``only()``
168 168
 ---------------------------------------
169 169
 
170  
-Use :ref:`defer() and only() <queryset-defer>` if there are database columns you
  170
+Use :meth:`~django.db.models.QuerySet.defer()` and
  171
+:meth:`~django.db.models.QuerySet.only()` if there are database columns you
171 172
 know that you won't need (or won't need in most cases) to avoid loading
172 173
 them. Note that if you *do* use them, the ORM will have to go and get them in a
173 174
 separate query, making this a pessimization if you use it inappropriately.
6  docs/topics/db/sql.txt
@@ -116,9 +116,9 @@ Fields may also be left out::
116 116
 
117 117
     >>> people = Person.objects.raw('SELECT id, first_name FROM myapp_person')
118 118
 
119  
-The ``Person`` objects returned by this query will be :ref:`deferred
120  
-<queryset-defer>` model instances. This means that the fields that are omitted
121  
-from the query will be loaded on demand. For example::
  119
+The ``Person`` objects returned by this query will be deferred model instances
  120
+(see :meth:`~django.db.models.QuerySet.defer()`). This means that the fields
  121
+that are omitted from the query will be loaded on demand. For example::
122 122
 
123 123
     >>> for p in Person.objects.raw('SELECT id, first_name FROM myapp_person'):
124 124
     ...     print p.first_name, # This will be retrieved by the original query

0 notes on commit 2dc2ed8

Please sign in to comment.
Something went wrong with that request. Please try again.