Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Jacob Kaplan-Moss authored June 07, 2007

Showing 1 changed file with 10 additions and 8 deletions. Show diff stats Hide diff stats

  1. 18  docs/model-api.txt
18  docs/model-api.txt
@@ -1860,14 +1860,15 @@ rows. Example::
1860 1860
         row = cursor.fetchone()
1861 1861
         return row
1862 1862
 
1863  
-``connection`` and ``cursor`` simply use the standard `Python DB-API`_. If
1864  
-you're not familiar with the Python DB-API, note that the SQL statement in
1865  
-``cursor.execute()`` uses placeholders, ``"%s"``, rather than adding parameters
1866  
-directly within the SQL. If you use this technique, the underlying database
1867  
-library will automatically add quotes and escaping to your parameter(s) as
1868  
-necessary. (Also note that Django expects the ``"%s"`` placeholder, *not* the
1869  
-``"?"`` placeholder, which is used by the SQLite Python bindings. This is for
1870  
-the sake of consistency and sanity.)
  1863
+``connection`` and ``cursor`` mostly implement the standard `Python DB-API`_
  1864
+(except when it comes to `transaction handling`_). If you're not familiar with
  1865
+the Python DB-API, note that the SQL statement in ``cursor.execute()`` uses
  1866
+placeholders, ``"%s"``, rather than adding parameters directly within the SQL.
  1867
+If you use this technique, the underlying database library will automatically
  1868
+add quotes and escaping to your parameter(s) as necessary. (Also note that
  1869
+Django expects the ``"%s"`` placeholder, *not* the ``"?"`` placeholder, which is
  1870
+used by the SQLite Python bindings. This is for the sake of consistency and
  1871
+sanity.)
1871 1872
 
1872 1873
 A final note: If all you want to do is a custom ``WHERE`` clause, you can just
1873 1874
 just the ``where``, ``tables`` and ``params`` arguments to the standard lookup
@@ -1875,6 +1876,7 @@ API. See `Other lookup options`_.
1875 1876
 
1876 1877
 .. _Python DB-API: http://www.python.org/peps/pep-0249.html
1877 1878
 .. _Other lookup options: ../db-api/#extra-params-select-where-tables
  1879
+.. _transaction handling: ../transactions/
1878 1880
 
1879 1881
 Overriding default model methods
1880 1882
 --------------------------------

0 notes on commit 908b72f

Please sign in to comment.
Something went wrong with that request. Please try again.