Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A lib to help in the creation of shared schema multi tenants applications without suffering

Project Description

A lib to help in the creation applications with shared schema without suffering

Documentation

The full documentation is at https://django-shared-schema-tenants.readthedocs.io.

Quickstart

Install Django Shared Schema Tenants:

pip install django-shared-schema-tenants

Add it to your INSTALLED_APPS:

INSTALLED_APPS = (
    ...
    'shared_schema_tenants.apps.SharedSchemaTenantsConfig',
    ...
)

Add Django Shared Schema Tenants’s URL patterns:

from shared_schema_tenants import urls as shared_schema_tenants_urls


urlpatterns = [
    ...
    url(r'^', include(shared_schema_tenants_urls)),
    ...
]

Add TenantMiddleware to your MIDDLEWARES:

MIDDLEWARES = [
    # ...
    'shared_schema_tenants.middleware.TenantMiddleware',
    # ...
]

Features

  • Tenants synced with django requests: The active tenant can be extracted from the domain of the request and from a specific http header attribute.
  • Easy data isolation between tenants: You reatrieve and create data the same way you do without tenants. The active tenant can be retreived from the request, and can also be forcedly set.
  • Partially shared resources: If there are resources that can be accessed from more then one tenant in your applidation, you don’t need to duplicate it.

Running Tests

Does the code actually work?

source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ tox

Credits

Tools used in rendering this package:

History

0.1.0 (2017-08-10)

  • First release on PyPI.
Release History

Release History

This version
History Node

0.0.3

History Node

0.0.2

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django_shared_schema_tenants-0.0.3-py2.py3-none-any.whl (22.2 kB) Copy SHA256 Checksum SHA256 3.5 Wheel Aug 29, 2017
django-shared-schema-tenants-0.0.3.tar.gz (16.2 kB) Copy SHA256 Checksum SHA256 Source Aug 29, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting