diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2006-05-06 23:16:43 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2006-05-06 23:16:43 +0000 |
| commit | be0032f5bafb58bc055ef21910e197aa6547a96b (patch) | |
| tree | c3a26caf1caba4f149d58e92bf1c38c684abb318 /docs/model-api.txt | |
| parent | 3c72a46f621d04189b48aba678e45fe3d23df5cb (diff) | |
Removed section in docs/model-api.txt about connection.commit(), which no longer exists
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2863 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/model-api.txt')
| -rw-r--r-- | docs/model-api.txt | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/docs/model-api.txt b/docs/model-api.txt index 72c7f5d8b7..073a0f3ea9 100644 --- a/docs/model-api.txt +++ b/docs/model-api.txt @@ -1581,15 +1581,6 @@ rows. Example:: row = cursor.fetchone() return row -If your custom SQL statement alters the data in your database -- for example, -via a ``DELETE`` or ``UPDATE`` -- you'll need to call ``db.commit()``. Example:: - - def my_custom_sql2(self): - from django.db import connection - cursor = connection.cursor() - cursor.execute("DELETE FROM bar WHERE baz = %s", [self.baz]) - connection.commit() - ``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 |
