1
0
mirror of https://github.com/django/django.git synced 2024-12-23 01:25:58 +00:00

Updated location of database backend data_types attribute in docs.

This commit is contained in:
Tim Graham 2015-03-17 20:03:07 -04:00
parent 53d11c6821
commit d9a30ed190

View File

@ -692,12 +692,12 @@ storing a string.
If :meth:`.get_internal_type` returns a string that is not known to Django for If :meth:`.get_internal_type` returns a string that is not known to Django for
the database backend you are using -- that is, it doesn't appear in the database backend you are using -- that is, it doesn't appear in
``django.db.backends.<db_name>.creation.data_types`` -- the string will still be ``django.db.backends.<db_name>.base.DatabaseWrapper.data_types`` -- the string
used by the serializer, but the default :meth:`~Field.db_type` method will will still be used by the serializer, but the default :meth:`~Field.db_type`
return ``None``. See the documentation of :meth:`~Field.db_type` for reasons why method will return ``None``. See the documentation of :meth:`~Field.db_type`
this might be useful. Putting a descriptive string in as the type of the field for reasons why this might be useful. Putting a descriptive string in as the
for the serializer is a useful idea if you're ever going to be using the type of the field for the serializer is a useful idea if you're ever going to
serializer output in some other place, outside of Django. be using the serializer output in some other place, outside of Django.
.. _converting-model-field-to-serialization: .. _converting-model-field-to-serialization: