Fixed #9033 - Add bullets to QuerySet extra() arguments. thanks julien for the suggestion and dwillis for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14816 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Timo Graham 2010-12-04 20:41:35 +00:00
parent 76c2c30daf
commit 00f36e0ebf
1 changed files with 107 additions and 107 deletions

View File

@ -709,7 +709,7 @@ principle, so you should avoid them if possible.
Specify one or more of ``params``, ``select``, ``where`` or ``tables``. None
of the arguments is required, but you should use at least one of them.
``select``
* ``select``
The ``select`` argument lets you put extra fields in the ``SELECT`` clause.
It should be a dictionary mapping attribute names to SQL clauses to use to
calculate that attribute.
@ -775,7 +775,7 @@ of the arguments is required, but you should use at least one of them.
tracking of parameters looks for ``%s`` and an escaped ``%`` character
like this isn't detected. That will lead to incorrect results.
``where`` / ``tables``
* ``where`` / ``tables``
You can define explicit SQL ``WHERE`` clauses -- perhaps to perform
non-explicit joins -- by using ``where``. You can manually add tables to
the SQL ``FROM`` clause by using ``tables``.
@ -812,7 +812,7 @@ of the arguments is required, but you should use at least one of them.
construct the queryset in the same way, so you can rely upon the alias
name to not change.
``order_by``
* ``order_by``
If you need to order the resulting queryset using some of the new fields
or tables you have included via ``extra()`` use the ``order_by`` parameter
to ``extra()`` and pass in a sequence of strings. These strings should
@ -833,7 +833,7 @@ of the arguments is required, but you should use at least one of them.
``extra()`` and it will behave as you expect (adding new constraints each
time).
``params``
* ``params``
The ``where`` parameter described above may use standard Python database
string placeholders -- ``'%s'`` to indicate parameters the database engine
should automatically quote. The ``params`` argument is a list of any extra