Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #3880: added a link to the transaction docs from the model API.…

… Thanks, ken37@tds.net.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@5435 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 908b72f76d9f4d4a9555f39669a95f3bdb0764c0 1 parent 6434de9
@jacobian jacobian authored
Showing with 10 additions and 8 deletions.
  1. +10 −8 docs/model-api.txt
View
18 docs/model-api.txt
@@ -1860,14 +1860,15 @@ rows. Example::
row = cursor.fetchone()
return row
-``connection`` and ``cursor`` simply use the standard `Python DB-API`_. If
-you're not familiar with the Python DB-API, note that the SQL statement in
-``cursor.execute()`` uses placeholders, ``"%s"``, rather than adding parameters
-directly within the SQL. If you use this technique, the underlying database
-library will automatically add quotes and escaping to your parameter(s) as
-necessary. (Also note that Django expects the ``"%s"`` placeholder, *not* the
-``"?"`` placeholder, which is used by the SQLite Python bindings. This is for
-the sake of consistency and sanity.)
+``connection`` and ``cursor`` mostly implement the standard `Python DB-API`_
+(except when it comes to `transaction handling`_). If you're not familiar with
+the Python DB-API, note that the SQL statement in ``cursor.execute()`` uses
+placeholders, ``"%s"``, rather than adding parameters directly within the SQL.
+If you use this technique, the underlying database library will automatically
+add quotes and escaping to your parameter(s) as necessary. (Also note that
+Django expects the ``"%s"`` placeholder, *not* the ``"?"`` placeholder, which is
+used by the SQLite Python bindings. This is for the sake of consistency and
+sanity.)
A final note: If all you want to do is a custom ``WHERE`` clause, you can just
just the ``where``, ``tables`` and ``params`` arguments to the standard lookup
@@ -1875,6 +1876,7 @@ API. See `Other lookup options`_.
.. _Python DB-API: http://www.python.org/peps/pep-0249.html
.. _Other lookup options: ../db-api/#extra-params-select-where-tables
+.. _transaction handling: ../transactions/
Overriding default model methods
--------------------------------
Please sign in to comment.
Something went wrong with that request. Please try again.