Kaydet (Commit) 00f36e0e authored tarafından Timo Graham's avatar Timo Graham

Fixed #9033 - Add bullets to QuerySet extra() arguments. thanks julien for the…

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
üst 76c2c30d
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment