Django

Code

Changeset 5698

Show
Ignore:
Timestamp:
07/14/07 11:58:54 (1 year ago)
Author:
adrian
Message:

Edited docs/db-api.txt changes from [5658]

Files:

Legend:

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

    r5658 r5698  
    122122--------- 
    123123 
    124 When you save an Django object, some pre-processing will occur on the the data 
    125 that is in the object. For example, if your model has a ``DateField`` with  
    126 ``auto_now=True`` set, the pre-save phase will alter the data in the object  
    127 to ensure that the date field contains the current date stamp. 
    128  
    129 Although these automated changes can be very useful, there will be times when 
    130 you just want to save the data as-is. In these cases, you can invoke a *Raw Save*  
    131 by passing ``raw=True`` as an argument to the ``save()`` method:: 
     124**New in Django development version** 
     125 
     126When you save an Django object, some pre-processing might occur on the the 
     127object's data before it's saved to the database. For example, if your model has 
     128a ``DateField`` with ``auto_now=True`` set, the pre-save phase will alter the 
     129data in the object  to ensure that the date field contains the current date 
     130stamp. 
     131 
     132Although these automated changes can be useful, sometimes you just want to save 
     133the data as-is. In these cases, you can invoke a **raw save**  by passing 
     134``raw=True`` as an argument to the ``save()`` method:: 
    132135 
    133136    b4.save(raw=True)  # Saves object, but does no pre-processing 
    134137 
    135 A raw save saves all the data in your object, but performs no pre-save processing  
    136 on the data in the object.  
     138A raw save saves all the data in your object, but performs no pre-save processing 
     139on the data in the object. 
    137140 
    138141Saving changes to objects