{ "info": { "author": "Jannis Leidel", "author_email": "jannis@leidel.info", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Topic :: Utilities" ], "description": "django-configurations\n=====================\n\n.. image:: https://secure.travis-ci.org/jezdez/django-configurations.png\n :alt: Build Status\n :target: https://travis-ci.org/jezdez/django-configurations\n\ndjango-configurations eases Django project configuration by relying\non the composability of Python classes. It extends the notion of\nDjango's module based settings loading with well established\nobject oriented programming patterns.\n\nCheck out the `documentation`__ for more complete examples.\n\n.. __: http://django-configurations.readthedocs.org/en/latest/\n\n\nQuickstart\n----------\n\nInstall django-configurations:\n\n.. code-block:: console\n\n pip install django-configurations\n\nThen subclass the included ``configurations.Configuration`` class in your\nproject's **settings.py** or any other module you're using to store the\nsettings constants, e.g.:\n\n.. code-block:: python\n\n # mysite/settings.py\n\n from configurations import Configuration\n\n class Dev(Configuration):\n DEBUG = True\n\nSet the ``DJANGO_CONFIGURATION`` environment variable to the name of the class\nyou just created, e.g. in bash:\n\n.. code-block:: console\n\n export DJANGO_CONFIGURATION=Dev\n\nand the ``DJANGO_SETTINGS_MODULE`` environment variable to the module\nimport path as usual, e.g. in bash:\n\n.. code-block:: console\n\n export DJANGO_SETTINGS_MODULE=mysite.settings\n\n*Alternatively* supply the ``--configuration`` option when using Django\nmanagement commands along the lines of Django's default ``--settings``\ncommand line option, e.g.::\n\n python manage.py runserver --settings=mysite.settings --configuration=Dev\n\nTo enable Django to use your configuration you now have to modify your\n**manage.py** or **wsgi.py** script to use django-configurations's versions\nof the appropriate starter functions, e.g. a typical **manage.py** using\ndjango-configurations would look like this:\n\n.. code-block:: python\n :emphasize-lines: 10\n\n #!/usr/bin/env python\n\n import os\n import sys\n\n if __name__ == \"__main__\":\n os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings')\n os.environ.setdefault('DJANGO_CONFIGURATION', 'Dev')\n\n from configurations.management import execute_from_command_line\n\n execute_from_command_line(sys.argv)\n\nNotice in line 10 we don't use the common tool\n``django.core.management.execute_from_command_line`` but instead\n``configurations.management.execute_from_command_line``.\n\nThe same applies to your **wsgi.py** file, e.g.:\n\n.. code-block:: python\n :emphasize-lines: 6\n\n import os\n\n os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings')\n os.environ.setdefault('DJANGO_CONFIGURATION', 'Dev')\n\n from configurations.wsgi import get_wsgi_application\n\n application = get_wsgi_application()\n\nHere we don't use the default ``django.core.wsgi.get_wsgi_application``\nfunction but instead ``configurations.wsgi.get_wsgi_application``.\n\nThat's it! You can now use your project with ``manage.py`` and your favorite\nWSGI enabled server.", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://django-configurations.readthedocs.org/", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "django-configurations-x", "package_url": "https://pypi.org/project/django-configurations-x/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-configurations-x/", "project_urls": { "Homepage": "http://django-configurations.readthedocs.org/" }, "release_url": "https://pypi.org/project/django-configurations-x/0.8.2/", "requires_dist": null, "requires_python": null, "summary": "A helper for organizing Django settings.", "version": "0.8.2" }, "last_serial": 1862782, "releases": { "0.8.1": [ { "comment_text": "", "digests": { "md5": "98d90539892fac7b8ab2fb68212ebfa4", "sha256": "a85484d493a695e8cca4a53cb0d78ad1d5a565afdc03a66b9ff7cbba18719504" }, "downloads": -1, "filename": "django_configurations_x-0.8.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "98d90539892fac7b8ab2fb68212ebfa4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 16381, "upload_time": "2015-12-02T04:12:35", "url": "https://files.pythonhosted.org/packages/8b/37/37fd055f9a369d657d5451cc985cdddab9cdbac24ae43517aac0b0cff041/django_configurations_x-0.8.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e8d689cbcccb1a582238784f90072925", "sha256": "0313150ad8d487fede1693c2d1bca476da8b4121e116f167f6629a4eb02d4734" }, "downloads": -1, "filename": "django-configurations-x-0.8.1.tar.gz", "has_sig": false, "md5_digest": "e8d689cbcccb1a582238784f90072925", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 35979, "upload_time": "2015-12-02T04:12:41", "url": "https://files.pythonhosted.org/packages/62/a2/98e84bce6145ea8fcd4052f96383d43eaba40b90a16ae304d70fb4021775/django-configurations-x-0.8.1.tar.gz" } ], "0.8.2": [ { "comment_text": "", "digests": { "md5": "e5a10db168815c0fe00fd9953503531e", "sha256": "a2c68d4322c3d231fa75d5e714d4995e89be378c8704ae790af4765b7e9a1b02" }, "downloads": -1, "filename": "django_configurations_x-0.8.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e5a10db168815c0fe00fd9953503531e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 16277, "upload_time": "2015-12-15T05:13:31", "url": "https://files.pythonhosted.org/packages/7a/7e/0fc9ef045ceb4892b6a207c9202cce386e6762d078336b7118b01eda2ef9/django_configurations_x-0.8.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "55e98b765dae161b44c74fcfb2e317a2", "sha256": "3b9f2896099f45f9877626d0d78c7f1f66c3512649613d5e784c03a4f82d27de" }, "downloads": -1, "filename": "django-configurations-x-0.8.2.tar.gz", "has_sig": false, "md5_digest": "55e98b765dae161b44c74fcfb2e317a2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 57328, "upload_time": "2015-12-15T05:13:38", "url": "https://files.pythonhosted.org/packages/00/dd/3c2ca85fa58060bc937084ab290be9629c7479be9a745840e07e4df74258/django-configurations-x-0.8.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e5a10db168815c0fe00fd9953503531e", "sha256": "a2c68d4322c3d231fa75d5e714d4995e89be378c8704ae790af4765b7e9a1b02" }, "downloads": -1, "filename": "django_configurations_x-0.8.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e5a10db168815c0fe00fd9953503531e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 16277, "upload_time": "2015-12-15T05:13:31", "url": "https://files.pythonhosted.org/packages/7a/7e/0fc9ef045ceb4892b6a207c9202cce386e6762d078336b7118b01eda2ef9/django_configurations_x-0.8.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "55e98b765dae161b44c74fcfb2e317a2", "sha256": "3b9f2896099f45f9877626d0d78c7f1f66c3512649613d5e784c03a4f82d27de" }, "downloads": -1, "filename": "django-configurations-x-0.8.2.tar.gz", "has_sig": false, "md5_digest": "55e98b765dae161b44c74fcfb2e317a2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 57328, "upload_time": "2015-12-15T05:13:38", "url": "https://files.pythonhosted.org/packages/00/dd/3c2ca85fa58060bc937084ab290be9629c7479be9a745840e07e4df74258/django-configurations-x-0.8.2.tar.gz" } ] }