Skip to content

Commit

Permalink
[1.1.X] Fixed #11931: Removed mention of nonexistent get_sql() method…
Browse files Browse the repository at this point in the history
… for arguments to limit_choices_to. Since the correct reference involves undocumented ORM internals, this simply removes the reference entirely in favor of publicly-documented use of Q objects. Backport of [11591] from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@11592 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
ubernostrum committed Sep 23, 2009
1 parent 880a447 commit f8c9712
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/ref/models/fields.txt
Expand Up @@ -844,7 +844,7 @@ define the details of how the relation works.
current date/time to be chosen.

Instead of a dictionary this can also be a :class:`~django.db.models.Q`
object (an object with a :meth:`get_sql` method) for more complex queries.
object for more :ref:`complex queries <complex-lookups-with-q>`.

``limit_choices_to`` has no effect on the inline FormSets that are created
to display related objects in the admin.
Expand Down
2 changes: 2 additions & 0 deletions docs/topics/db/queries.txt
Expand Up @@ -622,6 +622,8 @@ To avoid this problem, simply save the ``QuerySet`` and reuse it::
>>> print [p.headline for p in queryset] # Evaluate the query set.
>>> print [p.pub_date for p in queryset] # Re-use the cache from the evaluation.

.. _complex-lookups-with-q:

Complex lookups with Q objects
==============================

Expand Down

0 comments on commit f8c9712

Please sign in to comment.