{ "info": { "author": "Chris Beaven", "author_email": "smileychris@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "===================\ndjango-easysettings\n===================\n\n.. image:: https://circleci.com/gh/SmileyChris/django-easysettings.svg?style=svg\n :alt: Build status\n :target: https://circleci.com/gh/SmileyChris/django-easysettings\n\n.. image:: https://codecov.io/gh/SmileyChris/django-easysettings/branch/master/graph/badge.svg\n :alt: Coverage status\n :target: https://codecov.io/gh/SmileyChris/django-easysettings\n\n\nEasy app-specific settings for Django apps.\n\nProvides a method for using a declarative class for an app's default settings.\nThe instance of this class can be used to access all project settings in place\nof ``django.conf.settings``.\n\n.. contents::\n :local:\n :backlinks: none\n\n\nInstallation\n============\n\nTo install, run: ``pip install django-easysettings``\n\n\nUsage\n=====\n\nCreate a ``conf.py`` file within your app's directory, adding attributes for\nthe default values of your app-specific settings. They will be overridden by\nany project setting that is provided.\n\nFor example:\n\n.. code:: python\n\n from easysettings.app import AppSettings\n\n\n class Settings(AppSettings):\n MYAPP_FRUIT = 'Apple'\n\n\n settings = Settings()\n\n\nThen in your app, rather than `from django.conf import settings`, use\n`from myapp.conf import settings`. For example:\n\n.. code:: python\n\n from myapp.conf import settings\n\n\n def dashboard(request):\n context = {}\n context['fruit'] = settings.MYAPP_FRUIT\n if settings.DEBUG:\n context['debug_mode'] = True\n # ...\n\nDictionaries\n------------\n\nA common pattern is to use a dictionary as a namespace for all an app's\nsettings, such as ``settings.MYAPP['settings']``.\n\nEasy-settings handles this fine, overriding any keys provided in the project\nwhile still having access to the default app settings keys.\n\nYou can also use a subclass of an ``AppSettings`` class to set up a dictionary.\n\n.. code:: python\n\n from easysettings.apps import AppSettings\n\n\n class MyAppSettings(AppSettings):\n \"\"\"\n MyApp settings\n \"\"\"\n #: Preferred fruit\n FRUIT = 'Apple'\n #: Preferred drink\n DRINK = 'Water'\n\n\n class Settings(AppSettings):\n MYAPP = MyAppSettings\n\n\n settings = Settings()\n\nLegacy Usage\n------------\n\nIf previously your app used a common prefix (like `MYAPP_`) you\ncan still support projects that still use these stand-alone legacy settings\nwhile moving to a ``MYAPP`` dictionary for your settings.\n\n.. code:: python\n\n from easysettings.legacy import LegacyAppSettings\n\n\n class Settings(LegacyAppSettings):\n MYAPP = {'FRUIT': 'Apple'}\n\n\n settings = Settings()\n\nIf a project uses settings like ``MYAPP_FRUIT = 'Banana'`` they will continue\nto work. As soon as a project switches to ``MYAPP``, any ``MYAPP_*`` settings\nwill be ignored.\n\nWhile the legacy app settings class is used, the dictionary settings can still\nbe accessed via the prefixed setting (for example, ``settings.MYAPP_FRUIT``).\n\n==========\nChange Log\n==========\n\n2.0.1 (10 August 2019)\n======================\n\n- Add Python 3.7 and Django 2.2 to the test matrix.\n\n\n2.0 (24 April 2018)\n===================\n\n- Full rework of project! Import is now\n ``from easysettings.app import AppSettings`` (but left importable from\n ``easysettings`` for better backwards compatibility).\n\n- Removed isolated settings functionality, unnecessary with a separate settings\n module for tests and/or use of the ``TestCase.settings()`` context manager.\n\n- Added ``easysettings.legacy.LegacyAppSettings`` for providing backwards\n compatibility for prefixed project settings when moving settings to a\n dictionary rather than individual settings with the same prefix.\n\n1.1 (4 April 2017)\n==================\n\n- Django 1.11 compatibility.\n\n1.0.1 (24 May 2012)\n===================\n\n- Included extra source files.\n\n1.0 (16 April 2012)\n===================\n\n- Initial release.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/SmileyChris/django-easysettings", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "django-easysettings", "package_url": "https://pypi.org/project/django-easysettings/", "platform": "", "project_url": "https://pypi.org/project/django-easysettings/", "project_urls": { "Homepage": "http://github.com/SmileyChris/django-easysettings" }, "release_url": "https://pypi.org/project/django-easysettings/2.0.1/", "requires_dist": [ "tox ; extra == 'dev'", "django ; extra == 'dev'", "pytest-mock ; extra == 'dev'", "zest.releaser[recommended] ; extra == 'maintainer'", "pytest-mock ; extra == 'test'", "pytest-cov ; extra == 'test'" ], "requires_python": "", "summary": "Easy app-specific settings for Django", "version": "2.0.1" }, "last_serial": 5657953, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "ff3ab609b884ae7a459841d17cd3d9d8", "sha256": "e89587d83fa1945288a501423bb7c6e22ad8aa8d6fd92edaa244c84443943691" }, "downloads": -1, "filename": "django-easysettings-1.0.tar.gz", "has_sig": false, "md5_digest": "ff3ab609b884ae7a459841d17cd3d9d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1855, "upload_time": "2012-04-16T02:02:55", "url": "https://files.pythonhosted.org/packages/d8/e4/db0e3a8f34bbd60212d7d4cafb5707f1ec20e7ffa0aeb3d68950d85d5369/django-easysettings-1.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "dbe9a0b3086df9b932396bcbb47fdbb2", "sha256": "51394d2e26123ede7a6286bfa697d835aba753af23326d7648ca463ee3f9301e" }, "downloads": -1, "filename": "django-easysettings-1.0.1.tar.gz", "has_sig": false, "md5_digest": "dbe9a0b3086df9b932396bcbb47fdbb2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2614, "upload_time": "2012-05-24T06:28:02", "url": "https://files.pythonhosted.org/packages/60/da/8a031b87f66093671a3dadaaac2a52019f41985aa46c2cd240a2695f8329/django-easysettings-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "d6921c863f4febde7293890e75bafe30", "sha256": "758db6dbbf2a54a36be03b12e410f19135be88ccf848e0ed7be48d0461d88a17" }, "downloads": -1, "filename": "django-easysettings-1.0.2.tar.gz", "has_sig": true, "md5_digest": "d6921c863f4febde7293890e75bafe30", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2566, "upload_time": "2015-11-08T20:26:14", "url": "https://files.pythonhosted.org/packages/84/7f/2ca509e29ef1ee93c485302622f34795dfb91ee3e0d7437e9f06642822c4/django-easysettings-1.0.2.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "2f86cbd4a88567c847b9524fe685d845", "sha256": "b00649fd849deec220b6de1513520992cf75bf5b0397715d4352fdf96e4b7edc" }, "downloads": -1, "filename": "django_easysettings-1.1-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "2f86cbd4a88567c847b9524fe685d845", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 4930, "upload_time": "2017-04-04T01:29:40", "url": "https://files.pythonhosted.org/packages/96/61/c771e8ccbb42706c9ae65be78c58214513649b9681e8e9b9662cf02dbf50/django_easysettings-1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "62e9986c549b4fce1b86b2ca6ceb184c", "sha256": "344efac12275e1d0231c49c6bba23cf19928efd65ffaf9542a05b412eb6e3c67" }, "downloads": -1, "filename": "django-easysettings-1.1.tar.gz", "has_sig": true, "md5_digest": "62e9986c549b4fce1b86b2ca6ceb184c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2883, "upload_time": "2017-04-04T01:29:43", "url": "https://files.pythonhosted.org/packages/3e/5e/410a9226a34895fc0ea6d92b6c3a1f4bac054b3e83e77d848c78ec0227bd/django-easysettings-1.1.tar.gz" } ], "2.0": [ { "comment_text": "", "digests": { "md5": "dc472422aa1c09704ba21956eb512dc6", "sha256": "977422dd2b85856a2f22df6e6dedaa53aa6bd246c0053edf08b5a24758eb54c5" }, "downloads": -1, "filename": "django_easysettings-2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "dc472422aa1c09704ba21956eb512dc6", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6695, "upload_time": "2018-04-24T04:34:29", "url": "https://files.pythonhosted.org/packages/96/72/c0bae0aead763b364d40f1124148534bbbbeaf6fb67222565fe6fdd5f949/django_easysettings-2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "32de654ef6c41e782fb7977e2567dda4", "sha256": "ea5e430f76d276df07c36abdf70699d31a259b44d4832d8906007a65e3939988" }, "downloads": -1, "filename": "django-easysettings-2.0.tar.gz", "has_sig": false, "md5_digest": "32de654ef6c41e782fb7977e2567dda4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12077, "upload_time": "2018-04-24T04:34:28", "url": "https://files.pythonhosted.org/packages/58/95/4223fbef7c60cdf8bea132d7b055134fff294b21de2ba0cf493378cd39fc/django-easysettings-2.0.tar.gz" } ], "2.0.1": [ { "comment_text": "", "digests": { "md5": "b78c05d39065029865c0cde594559a01", "sha256": "59bbbd2d369a98ee9b265180cfa4f5ec1c5af557cb7984d21b05e86f915d0d2c" }, "downloads": -1, "filename": "django_easysettings-2.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b78c05d39065029865c0cde594559a01", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6754, "upload_time": "2019-08-09T22:20:21", "url": "https://files.pythonhosted.org/packages/c4/7c/cb00b51a22b940b3c60c9b59b14bef98da3c0b8bd7a40973683769f966c2/django_easysettings-2.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d8055d8d08174751ddfe5b7cc5aacd85", "sha256": "4d472d6b64c4f9f91432da943bcc30d5dd1f2c62b2f5b457310bfa4929b08fca" }, "downloads": -1, "filename": "django-easysettings-2.0.1.tar.gz", "has_sig": false, "md5_digest": "d8055d8d08174751ddfe5b7cc5aacd85", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6319, "upload_time": "2019-08-09T22:20:23", "url": "https://files.pythonhosted.org/packages/a3/5f/d9d2666ee3f38eb9e512b993cf07c04ece703fef8a0228f2136fe7251e71/django-easysettings-2.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b78c05d39065029865c0cde594559a01", "sha256": "59bbbd2d369a98ee9b265180cfa4f5ec1c5af557cb7984d21b05e86f915d0d2c" }, "downloads": -1, "filename": "django_easysettings-2.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b78c05d39065029865c0cde594559a01", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6754, "upload_time": "2019-08-09T22:20:21", "url": "https://files.pythonhosted.org/packages/c4/7c/cb00b51a22b940b3c60c9b59b14bef98da3c0b8bd7a40973683769f966c2/django_easysettings-2.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d8055d8d08174751ddfe5b7cc5aacd85", "sha256": "4d472d6b64c4f9f91432da943bcc30d5dd1f2c62b2f5b457310bfa4929b08fca" }, "downloads": -1, "filename": "django-easysettings-2.0.1.tar.gz", "has_sig": false, "md5_digest": "d8055d8d08174751ddfe5b7cc5aacd85", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6319, "upload_time": "2019-08-09T22:20:23", "url": "https://files.pythonhosted.org/packages/a3/5f/d9d2666ee3f38eb9e512b993cf07c04ece703fef8a0228f2136fe7251e71/django-easysettings-2.0.1.tar.gz" } ] }