{ "info": { "author": "codercage", "author_email": "codercage@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: BSD License", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "Usage\n-----\n\n1. Install\n~~~~~~~~~~\n::\n\n $ pip install django-rds-db-multitenant\n\n2. Implement a mapper\n~~~~~~~~~~~~~~~~~~~~~\n\n3. Update settings.py\n~~~~~~~~~~~~~~~~~~~~~\n\nSet the multitenant mapper by specifying the full dotted path to your\nimplementation (in this example, `mapper` is the name of file `mapper.py`):\n\n.. code:: python\n\n MULTITENANT_MAPPER_CLASS = 'myapp.mapper.TenantMapper'\n\nInstall the multitenant middleware as the *first* middleware of the list (prior to Django\n1.10, you must use the ``MIDDLEWARE_CLASSES`` setting):\n\n.. code:: python\n\n MIDDLEWARE = [\n 'rds_db_multitenant.middleware.MultiTenantMiddleware',\n ....\n ]\n\nChange your database backend to the multitenant wrapper:\n\n.. code:: python\n\n DATABASES = {\n 'default': {\n 'ENGINE': 'rds_db_multitenant.db.backends.mysql',\n 'NAME': 'devnull',\n }\n }\n\n*Note*: the ``NAME`` is useless for MySQL but due to a current\nlimitation, the named database must exist. It may be empty and\nread-only.\n\nOptionally, add the multitenant helper ``KEY_FUNCTION`` to your cache\ndefinition, which will cause cache keys to be prefixed with the value of\n``mapper.get_cache_prefix``:\n\n.. code:: python\n\n CACHES = {\n 'default' : {\n 'LOCATION': '127.0.0.1:11211',\n 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',\n 'KEY_FUNCTION': 'rds_db_multitenant.cache.helper.multitenant_key_func'\n }\n }", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/codercage/django-rds-db-multitenant", "keywords": "django multitenant", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "django-rds-db-multitenant", "package_url": "https://pypi.org/project/django-rds-db-multitenant/", "platform": "", "project_url": "https://pypi.org/project/django-rds-db-multitenant/", "project_urls": { "Homepage": "https://github.com/codercage/django-rds-db-multitenant" }, "release_url": "https://pypi.org/project/django-rds-db-multitenant/0.3.3/", "requires_dist": null, "requires_python": "", "summary": "Multitenant support for Django, using one tenant per database.", "version": "0.3.3" }, "last_serial": 4351142, "releases": { "0.3.3": [ { "comment_text": "", "digests": { "md5": "5979ac6950376f1c27d8ae31380e73de", "sha256": "5dbfb476744c8e134c9c8b9c825372166085f34c18d836d972226ae103b4a02c" }, "downloads": -1, "filename": "django-rds-db-multitenant-0.3.3.tar.gz", "has_sig": false, "md5_digest": "5979ac6950376f1c27d8ae31380e73de", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6645, "upload_time": "2018-10-08T08:45:51", "url": "https://files.pythonhosted.org/packages/9c/26/e21a36dc2a3ceb9e5b89efcc105588936b3fb83727536c1666ea64c76188/django-rds-db-multitenant-0.3.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5979ac6950376f1c27d8ae31380e73de", "sha256": "5dbfb476744c8e134c9c8b9c825372166085f34c18d836d972226ae103b4a02c" }, "downloads": -1, "filename": "django-rds-db-multitenant-0.3.3.tar.gz", "has_sig": false, "md5_digest": "5979ac6950376f1c27d8ae31380e73de", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6645, "upload_time": "2018-10-08T08:45:51", "url": "https://files.pythonhosted.org/packages/9c/26/e21a36dc2a3ceb9e5b89efcc105588936b3fb83727536c1666ea64c76188/django-rds-db-multitenant-0.3.3.tar.gz" } ] }