{ "info": { "author": "Jack Cushman", "author_email": "jcushman@law.harvard.edu", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Operating System :: Unix", "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 :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Utilities" ], "description": "========\nOverview\n========\n\n\n\nOverride arbitrary Django settings via environment variables.\n\n* Free software: BSD license\n\nInstallation\n============\n\n::\n\n pip install django-env-overrides\n\nDocumentation\n=============\n\ndjango-env-overrides lets you quickly adjust an existing Django app to load arbitrary settings from environment variables.\n\nSetup\n-----\n\nAdd these lines to the end of your ``setup.py`` file:\n\n::\n\n import django_env_overrides\n django_env_overrides.apply_to(globals())\n\nAny environment variable prefixed with ``DJANGO__`` will now be imported to your settings.\n\nExample\n-------\n\nsettings.py:\n\n::\n\n DEBUG = True\n MEDIA_URL = '/media/'\n DATABASES = {\n 'default': {\n 'ENGINE': 'sqlite3',\n }\n }\n TEMPLATES = [\n {\n 'BACKEND': 'django.template.backends.django.DjangoTemplates',\n 'OPTIONS': {\n 'context_processors': [\n 'django.contrib.auth.context_processors.auth',\n ]\n }\n }\n ]\n\n import django_env_overrides\n django_env_overrides.apply_to(globals())\n\nEnvironment:\n\n::\n\n DJANGO__SECRET_KEY=secret\n DJANGO__MEDIA_URL=/new_url/\n DJANGO__bool__DEBUG=False\n POSTGRES=postgres://uf07k1:wegauwhg@ec2-107-21-253-135.compute-1.amazonaws.com:5431/d8r82722\n DJANGO__db__DATABASES__default=$POSTGRES\n DJANGO__TEMPLATES__0__OPTIONS__context_processors__1='my.context.processor'\n\nResult:\n\n::\n\n DEBUG = False\n MEDIA_URL = '/new_url/'\n SECRET_KEY = 'secret'\n DATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.postgresql_psycopg2',\n 'NAME': 'd8r82722',\n 'HOST': 'ec2-107-21-253-135.compute-1.amazonaws.com',\n 'USER': 'uf07k1',\n 'PASSWORD': 'wegauwhg',\n 'PORT': 5431,\n }\n }\n TEMPLATES = [\n {\n 'BACKEND': 'django.template.backends.django.DjangoTemplates',\n 'OPTIONS': {\n 'context_processors': [\n 'django.contrib.auth.context_processors.auth',\n 'my.context.processor',\n ]\n }\n }\n ]\n\nFormat for environment variables\n--------------------------------\n\nThe general format for environment variable names is:\n\n __________\n\n```` defaults to ``DJANGO``. If you want to use another prefix, use ``django_env_overrides.apply_to(globals(), prefix=\"MYPREFIX\")``.\n\n```` (optional) is any `type known to the django-environ package `_.\n Currently the supported types are str, bool, int, float, json, list, tuple, dict, url, path, db_url, cache_url, search_url, and email_url.\n See the django-environ package for usage.\n\n```` is optional and defaults to ``str``.\n\n``______`` specifies the setting or subsetting the value should be assigned to. Path elements\nare treated as array indexes if they are integers, and otherwise as dictionary keys.\n\nDevelopment\n===========\n\nSee CONTRIBUTING.rst\n\n\nChangelog\n=========\n\n0.1.0 (2016-07-21)\n-----------------------------------------\n\n* First release on PyPI.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jcushman/django-env-overrides", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "django-env-overrides", "package_url": "https://pypi.org/project/django-env-overrides/", "platform": "", "project_url": "https://pypi.org/project/django-env-overrides/", "project_urls": { "Homepage": "https://github.com/jcushman/django-env-overrides" }, "release_url": "https://pypi.org/project/django-env-overrides/0.1.0/", "requires_dist": null, "requires_python": "", "summary": "Override arbitrary Django settings via environment variables.", "version": "0.1.0" }, "last_serial": 2243024, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "d197089da3c92de15175befa56a6244d", "sha256": "3eb1f4718160cc7b1b8c1997c7442442048d2c3deb8aa3bebd4008a7c5e87aa0" }, "downloads": -1, "filename": "django_env_overrides-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d197089da3c92de15175befa56a6244d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5730, "upload_time": "2016-07-25T18:56:11", "url": "https://files.pythonhosted.org/packages/c1/5f/bc7f7ac4f896c157055c6ac6a3b5a45ace65aa48990a37763be3f3beb736/django_env_overrides-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0d8551da5ae5875c810f8d7085bc2252", "sha256": "2f7c1311a3e0fc5f3dbcfc4e25f3a0b4518f2e9ac37dc49a3a098973e7f1124e" }, "downloads": -1, "filename": "django-env-overrides-0.1.0.tar.gz", "has_sig": false, "md5_digest": "0d8551da5ae5875c810f8d7085bc2252", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10000, "upload_time": "2016-07-25T18:55:50", "url": "https://files.pythonhosted.org/packages/2c/a7/d03111753170ca0707c00859240f56bde8f8a999a82ecdf17b2265ec4203/django-env-overrides-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d197089da3c92de15175befa56a6244d", "sha256": "3eb1f4718160cc7b1b8c1997c7442442048d2c3deb8aa3bebd4008a7c5e87aa0" }, "downloads": -1, "filename": "django_env_overrides-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d197089da3c92de15175befa56a6244d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5730, "upload_time": "2016-07-25T18:56:11", "url": "https://files.pythonhosted.org/packages/c1/5f/bc7f7ac4f896c157055c6ac6a3b5a45ace65aa48990a37763be3f3beb736/django_env_overrides-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0d8551da5ae5875c810f8d7085bc2252", "sha256": "2f7c1311a3e0fc5f3dbcfc4e25f3a0b4518f2e9ac37dc49a3a098973e7f1124e" }, "downloads": -1, "filename": "django-env-overrides-0.1.0.tar.gz", "has_sig": false, "md5_digest": "0d8551da5ae5875c810f8d7085bc2252", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10000, "upload_time": "2016-07-25T18:55:50", "url": "https://files.pythonhosted.org/packages/2c/a7/d03111753170ca0707c00859240f56bde8f8a999a82ecdf17b2265ec4203/django-env-overrides-0.1.0.tar.gz" } ] }