  Returns the database column data type for the :class:`~django.db.models.Field`,
  taking into account the connection object, and the settings associated with it.
  
  Say you've created a PostgreSQL custom type called ``mytype``. You can use this
  field with Django by subclassing ``Field`` and implementing the :meth:`db_type`
  method, like so::
  
      from django.db import models
  
      class MytypeField(models.Field):
          def db_type(self, connection):
 
</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 .. method:: db_type(self, connection)
 </s> add .. method:: Field.db_type(self, connection) </s> remove :meth:`to_python`::
 </s> add :meth:`.to_python`:: </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 :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.
field with Django by subclassing ``Field`` and implementing the
:meth:`.db_type` method, like so::
  Returns the database column data type for the :class:`~django.db.models.Field`,
  taking into account the connection object, and the settings associated with it.
  
  Say you've created a PostgreSQL custom type called ``mytype``. You can use this
field with Django by subclassing ``Field`` and implementing the
:meth:`.db_type` method, like so::
field with Django by subclassing ``Field`` and implementing the
:meth:`.db_type` method, like so::
  
      from django.db import models
  
      class MytypeField(models.Field):
          def db_type(self, connection):
keep keep keep keep 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