1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
.. _installation:
Installation
============
1. Install the package from PyPi:
.. code-block:: bash
$ pip install django-postgres-extra
2. Add ``django.contrib.postgres`` and ``psqlextra`` to your ``INSTALLED_APPS``:
.. code-block:: python
INSTALLED_APPS = [
...
"django.contrib.postgres",
"psqlextra",
]
3. Set the database engine to ``psqlextra.backend``:
.. code-block:: python
DATABASES = {
"default": {
...
"ENGINE": "psqlextra.backend",
},
}
.. note::
Already using a custom back-end? Set :ref:`POSTGRES_EXTRA_DB_BACKEND_BASE <POSTGRES_EXTRA_DB_BACKEND_BASE>` to your custom back-end.
|