{ "info": { "author": "Adam Mckaig", "author_email": "adam.mckaig@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "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.3", "Programming Language :: Python :: 3.4", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "DjAppSettings: Per-App Settings for Django\n==========================================\n\n* I hate pasting blobs into my settings.py every time I enable an app.\n\n* This is a Python module which provides a sane way for reusable Django apps to configure themselves.\n\n* It's a drop-in replacement for the ``django.conf.settings`` class. You can fetch all of your project, app, and global default settings via a single ``settings`` object.\n\n* It doesn't touch your project's settings module, and existing Django apps are free to ignore it. Your app can even fall back to the usual method if this module isn't available.\n\n* App settings are prevented from clobbering `built-in settings`_. They can only *add* settings.\n\n* Project settings (in ``DJANGO_SETTINGS_MODULE``) override app settings.\n\n* Using per-app prefixes is a good idea, but not mandatory.\n\n.. _built-in settings: http://code.djangoproject.com/browser/django/trunk/django/conf/global_settings.py\n\n\nBut, but\n--------\n\n* I'm aware of `Jared Forsyth`_'s `django-appsettings`_, and I think it's lovely but wrong. Project settings should not be editable in the Django admin.\n\n* I'm also aware that this feature has been rejected numerous times on the Django trac. But pasting a bunch of junk into my ``settings.py`` each time I add an app is a pain in the ass.\n\n* Checking for a setting (via ``settings.hasattr``), and falling back to a hard-coded default value is a terrible solution, because your defaults are duplicated and buried. They should be easily discoverable.\n\n.. _Jared Forsyth: http://github.com/jabapyth\n.. _django-appsettings: http://github.com/jabapyth/django-appsettings\n\n\nUsage\n=====\n\nWhere you would usually do something like::\n\n from django.conf import settings\n getattr(settings, \"MY_SETTING\", \"DEFAULT\")\n\nCreate a ``settings.py`` file in your app, containing::\n\n MY_SETTING = \"DEFAULT\"\n\nand do something like::\n\n from djappsettings import settings\n settings.MY_SETTING\n\nIf you'd like to support this module where available, but fall back to the usual method if not, just ``try`` it::\n\n try: from djappsettings import settings\n except: from django.conf import settings\n settings.MY_SETTING\n\n\nInstallation\n============\n\nVia Pip::\n\n $ pip install djappsettings\n\nVia GitHub::\n\n $ git clone git://github.com/adammck/djappsettings.git\n $ python djangoappsettings/setup.py install\n\n\nTesting\n=======\n\nInstall tox and run the tests::\n\n $ git clone git://github.com/adammck/djappsettings.git\n $ pip install tox\n $ cd djappsettings\n $ tox\n\n\nBugs?\n=====\n\nThis was created to scratch an itch for the `RapidSMS`_ project. I hope it will be useful to you. Use it at your own risk. (But do use it, because it's *way* better.)\n\nPatches and pull requests are very welcome.\nPlease file bugs on `GitHub`_.\n\n.. _RapidSMS: http://rapidsms.org\n.. _GitHub: http://github.com/adammck/djappsettings/issues\n\n\nLicense\n=======\n\ndjappsettings is free software, available under the BSD license.\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/adammck/djappsettings", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "djappsettings", "package_url": "https://pypi.org/project/djappsettings/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/djappsettings/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/adammck/djappsettings" }, "release_url": "https://pypi.org/project/djappsettings/0.4.0/", "requires_dist": null, "requires_python": null, "summary": "Per-app default settings for Django", "version": "0.4.0" }, "last_serial": 1668795, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "6c728f283c333d729396427285bec4a9", "sha256": "b8838168fb2fbaab0192ab862f3f1bd4405f00ac58d5a21feb5d427f09e1be95" }, "downloads": -1, "filename": "djappsettings-0.1.0.tar.gz", "has_sig": false, "md5_digest": "6c728f283c333d729396427285bec4a9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2014, "upload_time": "2010-08-05T10:35:02", "url": "https://files.pythonhosted.org/packages/c8/3f/45e2aa25a11fae7a53a8178bc06a6651ccec19d9fd6c869ceb9c3bf58b29/djappsettings-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "8173fe2e962bc39f787fa76691e4a737", "sha256": "70c0a29ebc7616e7ba28babf1ae3ed7f9daa14d807123bb9b9e25b1a7db791bc" }, "downloads": -1, "filename": "djappsettings-0.2.0.tar.gz", "has_sig": false, "md5_digest": "8173fe2e962bc39f787fa76691e4a737", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3426, "upload_time": "2014-10-13T03:01:35", "url": "https://files.pythonhosted.org/packages/32/9c/b1b0dc550f40521d24c92ec4b1839956fbbe246932f81cd2651975276c52/djappsettings-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "c7ddb73ea954f614dbb2fd2df7e1a356", "sha256": "48420e42a64becc19d74469f7173f69557b0be901068aa5d8118a01c506f82eb" }, "downloads": -1, "filename": "djappsettings-0.2.1.tar.gz", "has_sig": false, "md5_digest": "c7ddb73ea954f614dbb2fd2df7e1a356", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3362, "upload_time": "2014-10-13T03:22:08", "url": "https://files.pythonhosted.org/packages/8d/4b/57348cc47115380df2e6e79555efd70a5d7971cfa4402aff6ee0eb37658b/djappsettings-0.2.1.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "2c7c2e64b2ff312ef9d62f4bcd98094f", "sha256": "cdc07b5d269a06665e30a07a0a5bed933dd2cdfe587a283231e59a2681044f94" }, "downloads": -1, "filename": "djappsettings-0.3.0.tar.gz", "has_sig": false, "md5_digest": "2c7c2e64b2ff312ef9d62f4bcd98094f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4419, "upload_time": "2015-01-18T14:51:14", "url": "https://files.pythonhosted.org/packages/b6/ae/02aebb79ba40ed33779e98a7629701c3208660002d44beaa692b1d094427/djappsettings-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "ea0b92437f9353616fbb679ebfcb6727", "sha256": "97b7823962d35d2b6a977c3312ecd34eb53be426d3a71216140f9ca634450f53" }, "downloads": -1, "filename": "djappsettings-0.4.0.tar.gz", "has_sig": false, "md5_digest": "ea0b92437f9353616fbb679ebfcb6727", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4504, "upload_time": "2015-08-07T19:30:13", "url": "https://files.pythonhosted.org/packages/32/58/00793cca5e960fbb8903fdbba796451aad3412cfdcac880bcf0226bf9b60/djappsettings-0.4.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ea0b92437f9353616fbb679ebfcb6727", "sha256": "97b7823962d35d2b6a977c3312ecd34eb53be426d3a71216140f9ca634450f53" }, "downloads": -1, "filename": "djappsettings-0.4.0.tar.gz", "has_sig": false, "md5_digest": "ea0b92437f9353616fbb679ebfcb6727", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4504, "upload_time": "2015-08-07T19:30:13", "url": "https://files.pythonhosted.org/packages/32/58/00793cca5e960fbb8903fdbba796451aad3412cfdcac880bcf0226bf9b60/djappsettings-0.4.0.tar.gz" } ] }