{ "info": { "author": "Mike Fogel", "author_email": "mike@fogel.ca", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Utilities" ], "description": "---------- django-settings-context-processor ----------\n-------------------------------------------------------\n\n\nWhat does it do?\n---------------\nMakes specified django settings visible in the template rendering context.\n\n\nHow does it do it?\n------------------\ndjango-settings-context-processor takes the settings variable\nTEMPLATE_VISIBLE_SETTINGS, which should be an iterable of strings,\nand looks for a settings of the name of each iterable. The name-value\npair of this setting is then added to the template rendering context.\n\n\nCan I see an example?\n---------------------\nYes! Assuming the root django-settings-context-processor is in your\nPYTHON_PATH, this should work:\n\nsettings.py:\n\n INSTALLED_APPS = (\n ......\n 'settings_context_processor',\n )\n\n TEMPLATE_CONTEXT_PROCESSORS = (\n # the first 5 here are the django 1.2.1 default context processors\n 'django.contrib.auth.context_processors.auth',\n 'django.core.context_processors.debug',\n 'django.core.context_processors.i18n',\n 'django.core.context_processors.media',\n 'django.contrib.messages.context_processors.messages',\n ......\n 'settings_context_processor.context_processors.settings',\n )\n\n # define some settings we'd like to export\n CONTACT_PHONE='(555) 555-5555'\n CONTACT_EMAIL='contact@someplace.com\n CONTACT_ADDR_STREET='123 Anywhere Rd.'\n CONTACT_ADDR_CITYSTATE='Anyplace, AS 12345'\n\n # for settings_context_processor\n TEMPLATE_VISIBLE_SETTINGS = (\n 'CONTACT_PHONE',\n 'CONTACT_EMAIL',\n 'CONTACT_ADDR_STREET',\n 'CONTACT_ADDR_CITYSTATE',\n )\n\n\nsome_template.html:\n\n \n\n\n\n\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/carbonXT/django-settings-context-processor", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "django-settings-context-processor", "package_url": "https://pypi.org/project/django-settings-context-processor/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-settings-context-processor/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/carbonXT/django-settings-context-processor" }, "release_url": "https://pypi.org/project/django-settings-context-processor/0.2/", "requires_dist": null, "requires_python": null, "summary": "Makes specified django settings visible in template rendering context.", "version": "0.2" }, "last_serial": 851008, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "b33beaf3ea510c211c80419eed4a95fe", "sha256": "d37c853d69a3069f5abbf94c7f4f6fc0fac38bbd0524190cd5a250ba800e496a" }, "downloads": -1, "filename": "django-settings-context-processor-0.2.tar.gz", "has_sig": false, "md5_digest": "b33beaf3ea510c211c80419eed4a95fe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1895, "upload_time": "2013-08-28T09:16:13", "url": "https://files.pythonhosted.org/packages/ce/7c/d80d59a2eea6688b9a6a7b6e138749fb906b29f5f9f9eae55ab425e1a110/django-settings-context-processor-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b33beaf3ea510c211c80419eed4a95fe", "sha256": "d37c853d69a3069f5abbf94c7f4f6fc0fac38bbd0524190cd5a250ba800e496a" }, "downloads": -1, "filename": "django-settings-context-processor-0.2.tar.gz", "has_sig": false, "md5_digest": "b33beaf3ea510c211c80419eed4a95fe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1895, "upload_time": "2013-08-28T09:16:13", "url": "https://files.pythonhosted.org/packages/ce/7c/d80d59a2eea6688b9a6a7b6e138749fb906b29f5f9f9eae55ab425e1a110/django-settings-context-processor-0.2.tar.gz" } ] }