File: installation.rst

package info (click to toggle)
python-django-postgres-extra 2.0.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,096 kB
  • sloc: python: 9,057; makefile: 17; sh: 7; sql: 1
file content (36 lines) | stat: -rw-r--r-- 759 bytes parent folder | download | duplicates (3)
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.