  
  The ``SubfieldBase`` metaclass
  ------------------------------
  
  As we indicated in the introduction_, field subclasses are often needed for
  two reasons: either to take advantage of a custom database column type, or to
  handle complex Python types. Obviously, a combination of the two is also
  possible. If you're only working with custom database column types and your
 
</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. </s> remove and pass the rest to the :meth:`get_db_prep_lookup` method of the parent class.
 </s> add and pass the rest to the :meth:`.get_db_prep_lookup` method of the parent class. </s> remove .. class:: django.db.models.Field

.. attribute:: description
 </s> add .. attribute:: Field.description </s> remove :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.
 </s> add :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. </s> remove .. method:: get_prep_lookup(self, lookup_type, value)
 </s> add .. method:: Field.get_prep_lookup(self, lookup_type, value)
.. class:: django.db.models.SubfieldBase

  
  The ``SubfieldBase`` metaclass
  ------------------------------
  
.. class:: django.db.models.SubfieldBase

  As we indicated in the introduction_, field subclasses are often needed for
  two reasons: either to take advantage of a custom database column type, or to
  handle complex Python types. Obviously, a combination of the two is also
  possible. If you're only working with custom database column types and your
keep keep keep add 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