Getting started¶
Warning
Although it generally should work on other versions, Django Postgres Extensions has been tested with Python 2.7.12, Python 3.6 and Django 1.10.5.
Installation¶
Install with pip install django_postgres_extensions
Setup project¶
In your settings.py, add ‘django.contrib.postgres’ and ‘django_postgres_extensions’ to the list of INSTALLED APPS and configure the database to use the included backend (subclassed from the default Django Postgres backend):
INSTALLED_APPS = [
'django.contrib.contenttypes',
'django.contrib.auth',
'django.contrib.sites',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.admin.apps.SimpleAdminConfig',
'django.contrib.staticfiles',
'django.contrib.postgres',
'django_postgres_extensions'
]
DATABASES = {
'default': {
'ENGINE': 'django_postgres_extensions.backends.postgresql',
'NAME': 'db',
'USER': 'postgres',
'PASSWORD': 'postgres',
'HOST': '127.0.0.1',
'PORT': 5432,
}
}