Django

Code

Changeset 6902

Show
Ignore:
Timestamp:
12/09/07 02:10:09 (9 months ago)
Author:
mtredinnick
Message:

Tweaked the custom field documentation so that people reading about to_python() get a big hint to look at the SubfieldBase? metaclass.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/custom_model_fields.txt

    r6792 r6902  
    383383Python object type we want to store in the model's attribute. 
    384384 
     385**Remember:** If your custom field needs the ``to_python()`` method to be 
     386called when it is created, you should be using `The SubfieldBase metaclass`_ 
     387mentioned earlier. Otherwise ``to_python()`` won't be called automatically. 
     388 
    385389``get_db_prep_save(self, value)`` 
    386390~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~