          # ...
          my_field = BetterCharField(25)
  
  Finally, if your column requires truly complex SQL setup, return ``None`` from
  :meth:`db_type`. This will cause Django's SQL creation code to skip over this
  field. You are then responsible for creating the column in the right table in
  some other way, of course, but this gives you a way to tell Django to get out of
  the way.
  
  Converting database values to Python objects
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
  .. method:: to_python(self, value)
 
</s> remove .. method:: to_python(self, value)
 </s> add .. method:: Field.to_python(self, value) </s> remove .. class:: django.db.models.SubfieldBase

 </s> add  </s> remove .. method:: get_prep_value(self, value)
 </s> add .. method:: Field.get_prep_value(self, value) </s> remove ``datetime``. The simplest way to handle this in a ``db_type()`` method is to
check the ``connection.settings_dict['ENGINE']`` attribute.
 </s> add ``datetime``. The simplest way to handle this in a :meth:`.db_type`
method is to check the ``connection.settings_dict['ENGINE']`` attribute.
:meth:`.db_type`. This will cause Django's SQL creation code to skip
over this field. You are then responsible for creating the column in the right
table in some other way, of course, but this gives you a way to tell Django to
get out of the way.
          # ...
          my_field = BetterCharField(25)
  
  Finally, if your column requires truly complex SQL setup, return ``None`` from
:meth:`.db_type`. This will cause Django's SQL creation code to skip
over this field. You are then responsible for creating the column in the right
table in some other way, of course, but this gives you a way to tell Django to
get out of the way.
:meth:`.db_type`. This will cause Django's SQL creation code to skip
over this field. You are then responsible for creating the column in the right
table in some other way, of course, but this gives you a way to tell Django to
get out of the way.
:meth:`.db_type`. This will cause Django's SQL creation code to skip
over this field. You are then responsible for creating the column in the right
table in some other way, of course, but this gives you a way to tell Django to
get out of the way.
:meth:`.db_type`. This will cause Django's SQL creation code to skip
over this field. You are then responsible for creating the column in the right
table in some other way, of course, but this gives you a way to tell Django to
get out of the way.
  
  Converting database values to Python objects
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
  .. method:: to_python(self, value)
keep keep keep keep replace replace replace replace keep keep keep keep keep
 Fixed #15308 -- Sphinx/reST fixes for the Custom Model Fields docs.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15547 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
docs/howto/custom-model-fields.txt