Ticket #9412: 9412_r9240_2.diff

File 9412_r9240_2.diff, 1.1 KB (added by Carl Meyer, 16 years ago)

fix another typo as well (doubled backticks on line 572)

  • docs/howto/custom-model-fields.txt

     
    437437
    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`.
    443443
     
    569569.. method:: value_to_string(self, obj)
    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::
    575575
Back to Top