{ "info": { "author": "Nick Lourie", "author_email": "developer@nicholaslourie.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "django-tagconstants\n===================\n\nDefine constants in your settings file, that are then made available in\nyour templates.\n\nInstallation\n============\n\nFrom the command line:\n\n::\n\n pip install django-tagconstants\n\nAdd tagconstants to your installed apps:\n\n.. code:: python\n\n INSTALLED_APPS = (\n ...\n 'tagconstants',\n ...\n )\n\nCreate a ``TAG_CONSTANTS`` dictionary in your ``settings.py`` file:\n\n.. code:: python\n\n TAG_CONSTANTS = {}\n\nUsage\n=====\n\nFor security purposes, ``tagconstants`` is designed so that you create a\nwhitelist of variables to make available in your templates. For more\ninformation see the **Design and Security** section.\n\nTo use a constant in your templates, first add the constant to your\n``TAG_CONSTANTS`` setting:\n\n.. code:: python\n\n TAG_CONSTANTS = {\n 'CONSTANT': 'SOME STRING',\n }\n\nThen in your templates, you can recall these constants with the\n``{% constant ... %}`` template tag:\n\n.. code:: html\n\n {% load tagconstants %}\n\n {% constant \"CONSTANT\" %}\n {# renders to 'SOME STRING' #}\n\n {% constant \"CONSTANT\" as \"variable_name\" %}\n {# loads the template variable variable_name=\"SOME STRING\" #}\n {# into the template context #}\n\nContributing\n============\n\nPull, fork, do whatever you'd like with the code.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/nalourie/django-tagconstants", "keywords": "django constants templates settings templatetags", "license": "MIT License", "maintainer": null, "maintainer_email": null, "name": "django-tagconstants", "package_url": "https://pypi.org/project/django-tagconstants/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-tagconstants/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/nalourie/django-tagconstants" }, "release_url": "https://pypi.org/project/django-tagconstants/0.1/", "requires_dist": null, "requires_python": null, "summary": "Define constants in your settings, and make them available in your templates.", "version": "0.1" }, "last_serial": 1470859, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "7693f2692e9993849586288ad9eed7a0", "sha256": "0e2ae4a2e00183cce86f3d95f8396e6e5239aefe280687e07dd7238e2a24f93e" }, "downloads": -1, "filename": "django-tagconstants-0.1.zip", "has_sig": false, "md5_digest": "7693f2692e9993849586288ad9eed7a0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9361, "upload_time": "2015-03-20T23:50:24", "url": "https://files.pythonhosted.org/packages/1a/f9/ecf04276443794a0b9f175e353d2ab3ac8eb50458bded5f33a3367511435/django-tagconstants-0.1.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7693f2692e9993849586288ad9eed7a0", "sha256": "0e2ae4a2e00183cce86f3d95f8396e6e5239aefe280687e07dd7238e2a24f93e" }, "downloads": -1, "filename": "django-tagconstants-0.1.zip", "has_sig": false, "md5_digest": "7693f2692e9993849586288ad9eed7a0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9361, "upload_time": "2015-03-20T23:50:24", "url": "https://files.pythonhosted.org/packages/1a/f9/ecf04276443794a0b9f175e353d2ab3ac8eb50458bded5f33a3367511435/django-tagconstants-0.1.zip" } ] }