Django

Code

Changeset 9314

Show
Ignore:
Timestamp:
11/01/08 14:20:00 (2 months ago)
Author:
kmtracey
Message:

Fixed #9412 -- Corrected a couple of typos in the custom model field doc. Thanks carljm.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/howto/custom-model-fields.txt

    r9258 r9314  
    438438You only need to override this method if you want to preprocess the value 
    439439somehow, just before saving. For example, Django's 
    440 `:class:`~django.db.models.DateTimeField` uses this method to set the attribute 
     440:class:`~django.db.models.DateTimeField` uses this method to set the attribute 
    441441correctly in the case of :attr:`~django.db.models.Field.auto_now` or 
    442442:attr:`~django.db.models.Field.auto_now_add`. 
     
    570570 
    571571This method is used by the serializers to convert the field into a string for 
    572 output. Calling :meth:``Field._get_val_from_obj(obj)`` is the best way to get the 
     572output. Calling :meth:`Field._get_val_from_obj(obj)` is the best way to get the 
    573573value to serialize. For example, since our ``HandField`` uses strings for its 
    574574data storage anyway, we can reuse some existing conversion code::