Skip to main content

django-couchdb-utils provide implementations for various Django backend (auth, sessions, cache, etc) that use CouchDB (through couchdbkit) instead of the relational databases supported by Django's ORM.

Project description

README

This project’s goal is to replace the RDBMS specific backends used in Django with CouchDB using Couchdbkit.

Currently it has a moderately tested:

To use this library, install Couchdbkit and reference it in your INSTALLED_APPS in settings.py

INSTALL

General Instructions

  • Reference the django_couchdb_utils apps into your INSTALLED_APPS in settings.py:

    ...
    "django_couchdb_utils.auth",
    "django_couchdb_utils.sessions",
    "django_couchdb_utils.cache",
    ...
  • To the COUCHDB_DATABASES (which is used by Couchdbkit) add the couchdb utils apps that you plan to use:

    ('django_couchdb_utils_auth',     'http://127.0.0.1:5984/authdb'),
    ('django_couchdb_utils_sessions', 'http://127.0.0.1:5984/sessionsdb'),
    ('django_couchdb_utils_cache',    'http://127.0.0.1:5984/cachedb'),
    ...

    If your do not use Couchdbkit otherwise, just add the following to your settings.py:

    COUCHDB_DATABASES = (
      ('django_couchdb_utils_auth', 'http://127.0.0.1:5984/somedb'),
      ...
    )

    As the library doesn’t make any assumptions about the Ids of the CouchDB objects it stores, it is safe to use it with an already existing database.

  • To enable authentication support add the AUTHENTICATION_BACKENDS attribute in settings.py like:

    AUTHENTICATION_BACKENDS = ('django_couchdb_utils.auth.backends.CouchDBAuthBackend',)
  • To enable cache support add the CACHE_BACKEND attribute in settings.py like:

    CACHE_BACKEND = "cache.couch://"
  • To enable sessions support add the SESSION_ENGINE attribute in settings.py like:

    SESSION_ENGINE = "django_couchdb_utils.sessions.couchdb"
  • To enable the CouchDB email caching backend, set the EMAIL_BACKEND attribute in settings.py like:

    EMAIL_BACKEND = "django_couchdb_utils.email.CouchDBEmailBackend"

    # the backend that should be wrapped by the CouchDB caching backend COUCHDB_EMAIL_BACKEND = ‘django.core.mail.backends.filebased.EmailBackend’

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_couchdb_utils-0.3.tar.gz (44.3 kB view details)

Uploaded Source

File details

Details for the file django_couchdb_utils-0.3.tar.gz.

File metadata

File hashes

Hashes for django_couchdb_utils-0.3.tar.gz
Algorithm Hash digest
SHA256 69d7184fbce4688433eb50762a68b2412bea1ddadb1fe4683b5bca57726c5b07
MD5 9400ccdfec66aa1b599896090a4168c4
BLAKE2b-256 957fc689098cfb4ab8d7b61077e79de54180ccdc4df9d7ae51fb626ac8e3eb32

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page