Django

Code

Changeset 2863

Show
Ignore:
Timestamp:
05/06/06 18:16:43 (2 years ago)
Author:
adrian
Message:

Removed section in docs/model-api.txt about connection.commit(), which no longer exists

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/model-api.txt

    r2850 r2863  
    15821582        return row 
    15831583 
    1584 If your custom SQL statement alters the data in your database -- for example, 
    1585 via a ``DELETE`` or ``UPDATE`` -- you'll need to call ``db.commit()``. Example:: 
    1586  
    1587     def my_custom_sql2(self): 
    1588         from django.db import connection 
    1589         cursor = connection.cursor() 
    1590         cursor.execute("DELETE FROM bar WHERE baz = %s", [self.baz]) 
    1591         connection.commit() 
    1592  
    15931584``connection`` and ``cursor`` simply use the standard `Python DB-API`_. If 
    15941585you're not familiar with the Python DB-API, note that the SQL statement in