{ "info": { "author": "Julian Perelli", "author_email": "jperelli@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 1.11", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "# django-variable-settings\n\nA simple django application to manage dynamic settings saved in database using namespaced keys and json string values.\n\n## Demo\n\nTo try it now, download this repo and use docker-compose to run it\n\n git clone git@github.com:jperelli/django-variable-settings.git\n cd django-variable-settings\n docker-compose up\n\nThen go to http://localhost:8080/admin and login with user `admin` and password `admin`, you should see the Settings. If you add a settings, it should be a json object. So a string should be saved with double quotes around it.\n\nIt can be tested from django shell also easily. Go to another console while `docker-compose up` is running and type\n\n docker-compose exec django ./manage.py shell\n >>> import variable_settings\n >>> variable_settings.set('evergreenstreet', 123)\n >>> variable_settings.set('address.evergreenstreet', 123)\n >>> variable_settings.set('address.evergreenavenue', 'first')\n >>> variable_settings.get('evergreenstreet')\n 123\n >>> variable_settings.get('address.evergreenavenue')\n u'first'\n >>> variable_settings.get('address.*')\n {u'address.evergreenavenue': u'first', u'address.evergreenstreet': 123}\n >>> variable_settings.all()\n {u'address.evergreenavenue': u'first', u'evergreenstreet': 123, u'address.evergreenstreet': 123}\n\n## Installation\n\n pip install django-variable-settings\n\nIn settings.py add\n\n variable_settings\n\nThen run migrations\n\n manage.py migrate variable_settings\n\nThen use it as in the Demo\n\n## Settings and custom command\n\nIf you want to add some default settings to the database then you can add something like this to `settings.py`\n\n # default django_variable_settings\n # use ./manage.py variable_settings_initialize\n # If overwrite=False(default) they are not applied if already exist in database\n VARIABLE_SETTINGS = [\n #[ key , value (, overwrite) ]\n ['alerting.connection', '127.0.0.1', False],\n ['alerting.warning', 123, False],\n ['wrong_permissions.enabled', True, True],\n ]\n\nUse custom command `./manage.py variable_settings_initialize` to save those in database. The command only overwrites the variable value if the last parameter is set to true\n\n## Caching\n\nWIP\n\n# Authors\n\n - Julian Perelli\n - Maxi Padulo\n\n# LICENSE\n\nMIT", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jperelli/django-variable-settings", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "django-variable-settings", "package_url": "https://pypi.org/project/django-variable-settings/", "platform": "", "project_url": "https://pypi.org/project/django-variable-settings/", "project_urls": { "Homepage": "https://github.com/jperelli/django-variable-settings" }, "release_url": "https://pypi.org/project/django-variable-settings/0.0.1/", "requires_dist": null, "requires_python": "", "summary": "A Django app to have editable key-value namespaced settings.", "version": "0.0.1" }, "last_serial": 3808044, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "f40cb0dbeab439b94c4685fa59fba622", "sha256": "040576fb31d38ecbfc598c5b84184bf22b83a7311bd4a0f47169eecd3fb38744" }, "downloads": -1, "filename": "django-variable-settings-0.0.1.tar.gz", "has_sig": false, "md5_digest": "f40cb0dbeab439b94c4685fa59fba622", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4777, "upload_time": "2018-04-25T20:34:04", "url": "https://files.pythonhosted.org/packages/08/1f/5fc3b4e8eba744d562ab30a866dd813c691b49456933998a93eb88a224c5/django-variable-settings-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f40cb0dbeab439b94c4685fa59fba622", "sha256": "040576fb31d38ecbfc598c5b84184bf22b83a7311bd4a0f47169eecd3fb38744" }, "downloads": -1, "filename": "django-variable-settings-0.0.1.tar.gz", "has_sig": false, "md5_digest": "f40cb0dbeab439b94c4685fa59fba622", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4777, "upload_time": "2018-04-25T20:34:04", "url": "https://files.pythonhosted.org/packages/08/1f/5fc3b4e8eba744d562ab30a866dd813c691b49456933998a93eb88a224c5/django-variable-settings-0.0.1.tar.gz" } ] }