{ "info": { "author": "Doug Winter", "author_email": "doug.winter@isotoma.com", "bugtrack_url": null, "classifiers": [], "description": "====================\ndjango-json-settings\n====================\n\ndjango-json-settings is a small Django application that allows you to provide\nspecific local settings in JSON format, generally for production or other\nnon-developer environments (although it could also be used for settings that\nvary on a per-developer basis).\n\nThis presumes you are deploying into a virtualenv, and it imposes a few\nassumptions about how that virtualenv should be structured, based on standard\nUNIX naming.\n\nWhat it does\n============\n\nWhen deployed in a virtualenv, and called from your settings.py,\ndjango-json-settings looks for a file called::\n\n /etc/settings.json\n\nThis file is then read and it's contents placed into the standard django\nsettings.\n\nYou do this by putting::\n\n from json_settings import *\n \nIn your settings.py at an appropriate point.\n\nAdditional magic settings\n=========================\n\nIn addition to this, django-json-settings will set three new values (if they aren't already defined)::\n\n VAR_DIRECTORY to /var\n STATIC_ROOT to /static\n MEDIA_ROOT to /media\n\nThese are quite useful things to have configured.\n\nHow to use it\n=============\n\nObviously first you should add a dependency to your setup.py on django-json-settings, and then install it.\n\nThen add a call to \"from json_settings import *\" in your settings.py at the\nright point. Generally you should structure your settings.py so that you have\n3 types of setting:\n\n 1. Things that are definitely going to need to be set in production. For example, ADMINS, ALLOWED_HOSTS, SECRET_KEY, STATIC_ROOT\n 2. Things you might want to change in production, but might want to leave alone, for example LOGGING\n 3. Things you don't want to change in production, ever. For example, MIDDLEWARE_CLASSES\n \nYou should put the json_settings import statement after all of those in 2, but before those in 3.\n \nThis means whoever is deploying the software gets lots of choice about the\nenvironment, but can't accidentally hose things that are really core\napplication configuration.\n \nHere is an example settings.py::\n\n import sys\n import os\n \n DEBUG = True\n ADMINS = (\n )\n\n ALLOWED_HOSTS = []\n TIME_ZONE = 'Europe/London'\n\n SECRET_KEY = '*ivd!%8j-=7r36ng^)rmeto(wj)#9)ylzd_hhrzv#x%+a)gs8x'\n\n SESSION_COOKIE_AGE = 3600\n\n LANGUAGE_CODE = 'en-us'\n \n STATIC_ROOT = 'static/'\n MEDIA_ROOT = 'media/'\n\n from json_settings import *\n\n TEMPLATE_DEBUG = DEBUG\n MANAGERS = ADMINS\n\n SITE_ID = 1\n \n ...\n \n\nTesting local settings\n======================\n\nYou can use a different settings file by setting an environment variable\nJSON_SETTINGS::\n\n JSON_SETTINGS=example.json ./manage.py runserver\n\nIf you want to try some settings out.\n\nError Handling\n==============\n\nIf the settings.json file is invalid then your application will terminate\nwith an error.\n\nIf the file is absent then this is only an error if it was provided using the\nJSON_SETTINGS environment variable. A missing file is otherwise assumed to be\nok (so you can put development defaults in your settings.py and not have a\nlocal settings file at all).", "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/isotoma/django-json-settings", "keywords": null, "license": "Apache Software License", "maintainer": null, "maintainer_email": null, "name": "django-json-settings", "package_url": "https://pypi.org/project/django-json-settings/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-json-settings/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/isotoma/django-json-settings" }, "release_url": "https://pypi.org/project/django-json-settings/0.2/", "requires_dist": null, "requires_python": null, "summary": "A Django application to let you provide local settings in json format", "version": "0.2" }, "last_serial": 2189293, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "c3be67737332a5324282721b840129a7", "sha256": "cf4baf00d99d0ebd5a525e46a5b783170058de85e05f3c0370c3dc9574ca18cd" }, "downloads": -1, "filename": "django-json-settings-0.1.zip", "has_sig": false, "md5_digest": "c3be67737332a5324282721b840129a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11678, "upload_time": "2014-01-17T11:37:34", "url": "https://files.pythonhosted.org/packages/88/a7/7c91836470263dc0b5ed214106f911c25f6ebd679cb183ad4793c8d63bbe/django-json-settings-0.1.zip" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "2988d0f15ba7eefc500f08f467c3c446", "sha256": "f856d0d357d0958f0964dd54cc5ad3133f2552628d473c38d2bcebd0960f433d" }, "downloads": -1, "filename": "django-json-settings-0.2.zip", "has_sig": false, "md5_digest": "2988d0f15ba7eefc500f08f467c3c446", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11867, "upload_time": "2016-06-27T12:53:53", "url": "https://files.pythonhosted.org/packages/09/1f/a4d272a017d766ea3c045db5735a13b7e8cd29d7b94721eea449c2530cfa/django-json-settings-0.2.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2988d0f15ba7eefc500f08f467c3c446", "sha256": "f856d0d357d0958f0964dd54cc5ad3133f2552628d473c38d2bcebd0960f433d" }, "downloads": -1, "filename": "django-json-settings-0.2.zip", "has_sig": false, "md5_digest": "2988d0f15ba7eefc500f08f467c3c446", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11867, "upload_time": "2016-06-27T12:53:53", "url": "https://files.pythonhosted.org/packages/09/1f/a4d272a017d766ea3c045db5735a13b7e8cd29d7b94721eea449c2530cfa/django-json-settings-0.2.zip" } ] }