2014-03-27 00:44:21 +08:00
|
|
|
``django.contrib.postgres``
|
|
|
|
===========================
|
|
|
|
|
2014-12-05 05:42:24 +08:00
|
|
|
.. versionadded:: 1.8
|
|
|
|
|
2014-03-27 00:44:21 +08:00
|
|
|
PostgreSQL has a number of features which are not shared by the other databases
|
|
|
|
Django supports. This optional module contains model fields and form fields for
|
|
|
|
a number of PostgreSQL specific data types.
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
Django is, and will continue to be, a database-agnostic web framework. We
|
|
|
|
would encourage those writing reusable applications for the Django
|
|
|
|
community to write database-agnostic code where practical. However, we
|
2014-05-28 07:46:48 +08:00
|
|
|
recognize that real world projects written using Django need not be
|
2014-03-27 00:44:21 +08:00
|
|
|
database-agnostic. In fact, once a project reaches a given size changing
|
|
|
|
the underlying data store is already a significant challenge and is likely
|
|
|
|
to require changing the code base in some ways to handle differences
|
|
|
|
between the data stores.
|
2014-05-28 07:46:48 +08:00
|
|
|
|
2014-03-27 00:44:21 +08:00
|
|
|
Django provides support for a number of data types which will
|
|
|
|
only work with PostgreSQL. There is no fundamental reason why (for example)
|
|
|
|
a ``contrib.mysql`` module does not exist, except that PostgreSQL has the
|
|
|
|
richest feature set of the supported databases so its users have the most
|
|
|
|
to gain.
|
|
|
|
|
|
|
|
.. toctree::
|
|
|
|
:maxdepth: 2
|
|
|
|
|
|
|
|
fields
|
|
|
|
forms
|
2014-09-06 04:53:11 +08:00
|
|
|
lookups
|
2014-03-15 01:34:49 +08:00
|
|
|
operations
|
|
|
|
validators
|