Metadata-Version: 2.0
Name: django-postgres-readonly
Version: 1.0.0
Summary: A backend for Django and Postgres that sets up a readonly connection
Home-page: https://github.com/opbeat/django-postgres-readonly
Author: Opbeat
Author-email: benjamin@opbeat.com
License: BSD
Keywords: django postgres
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: BSD License
Classifier: Framework :: Django
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Requires-Dist: Django
Requires-Dist: psycopg2
Provides-Extra: test
Requires-Dist: coverage; extra == 'test'

django-postgres-readonly
========================

A readonly database backend for Django and PostgreSQL. It does this by setting
the connection to "readonly".


Usage
-----

To configure a read-only database connection, add an entry to your ``DATABASES``
setting that uses `django_postgres_readonly` as the engine::

    DATABASES = {
        'default': {
            'NAME': 'my_django_db',
            'ENGINE': 'django.db.backends.postgresql',
            'USER': 'my_db_user',
            'PASSWORD': 'my_password'
        },
        'readonly': {
            'NAME': 'my_django_db',
            'ENGINE': 'django_postgres_readonly',
            'USER': 'my_db_user',
            'PASSWORD': 'my_password'
        }
    }


Caveats
-------

This backend is not meant to provide security against willful bad actors. Its
main reason of existence is to protect you against your own mistakes.

If you need secure way for read-only connections, you should probably
look into creating a separate user and grant it ``SELECT`` rights only.


