Author: ramiro
Date: 2012-01-06 09:15:15 -0800 (Fri, 06 Jan 2012)
New Revision: 17342
Modified:
django/trunk/docs/ref/models/querysets.txt
Log:
Moved misplaced documentation warning note about internal QuerySet query
atribute.
Modified: django/trunk/docs/ref/models/querysets.txt
===================================================================
--- django/trunk/docs/ref/models/querysets.txt 2012-01-05 00:45:31 UTC (rev
17341)
+++ django/trunk/docs/ref/models/querysets.txt 2012-01-06 17:15:15 UTC (rev
17342)
@@ -1752,6 +1752,12 @@
inner_q = Blog.objects.filter(name__contains='Cheddar').values('pk').query
entries = Entry.objects.filter(blog__in=inner_q)
+.. warning::
+
+ This ``query`` attribute should be considered an opaque internal attribute.
+ It's fine to use it like above, but its API may change between Django
+ versions.
+
This second form is a bit less readable and unnatural to write, since it
accesses the internal ``query`` attribute and requires a ``ValuesQuerySet``.
If your code doesn't require compatibility with Django 1.0, use the first
@@ -1772,12 +1778,6 @@
inner_qs = Blog.objects.filter(name__contains='Ch').values('name', 'id')
entries = Entry.objects.filter(blog__name__in=inner_qs)
-.. warning::
-
- This ``query`` attribute should be considered an opaque internal attribute.
- It's fine to use it like above, but its API may change between Django
- versions.
-
.. admonition:: Performance considerations
Be cautious about using nested queries and understand your database
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.