{
"info": {
"author": "Gerardo Orozco Mosqueda",
"author_email": "gerardo.orozco.mosqueda@gmail.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 4 - Beta",
"Environment :: Web Environment",
"Framework :: Django",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Utilities"
],
"description": "# django-template-utils\n\nJust a collection of useful template tags and filters gathered in a single app.\n\n## Index\n\n- [Instalation](#instalation)\n- [Contributing](#contributing)\n- [Usage](#usage)\n - [Tags](#tags)\n - [Filters](#filters)\n\n## Instalation\n\nVia pip:\n\n pip install django-template-utils\n\nVia easy_install:\n\n easy_install django-template-utils\n\nClonning the project:\n\n $ git clone git://github.com/gerardo-orozco/django-template-utils.git\n $ python django-template-utils/setup.py install\n\nAdd the app to your istalled apps:\n\n INSTALLED_APPS = (\n ...\n 'template_utils',\n ...\n )\n## Contributing\n\nYou have an idea of a useful tag or filter? Found a bug? Marvelous, your contribution will be very appreciated.\n\nPlease refer to the [Contributing](https://github.com/gerardo-orozco/django-template-utils/blob/master/CONTRIBUTING.md) section and have a happy coding!\n\n## Usage\n\n### Tags\n\nFirst load the tags inside whatever templates you are going to use them:\n\n {% load templateutils_tags %}\n\n#### active_url\n\nReturns a class to be assiged CSS styling that should make the chosen element highlighted as responsible of being in the active url.\n\nExample: Assuming that the reversed url is the current url, this tag will act as follows:\n\n {% active_url request url_name %} -> class=\"ui-active-url\"\n {% active_url request url_name class_name=myclass %} -> class=\"myclass\"\n {% active_url request url_name use_class=False %} -> ui-active-url\n {% active_url request url_name class_name=myclass use_class=False %} -> myclass\n\nWhere `urlname` is the name of the url to check; this must be defined in your `URLCONF`, otherwise it will raise a `NoReverseMatch` Error.\n\n#### current_url\n\nReturns the reversed url only if it is NOT the current url. Otherwise returns the character \"`#`\"\n\nExample:\n\n Some link\n\n#### ifmember\n\nChecks if the current user belongs to a specific group.\n\n- User must be looged in.\n- Requires the Django authentication contrib app and middleware.\n\nUsage:\n\n {% ifmember Admins %} ... {% endifusergroup %}\n\n#### mkrange\n\nAccepts the same arguments as the builtin `range` function and creates a list containing the result of `range`.\n\nUsage:\n\n {% mkrange [start, ]stop[, step] as context_name %}\n\nFor example:\n\n {% mkrange 5 10 2 as some_range %}\n {% for i in some_range %}\n {{ i }}: Something I want to repeat\n {% endfor %}\n\nProduces:\n\n 5: Something I want to repeat\n 7: Something I want to repeat\n 9: Something I want to repeat\n\n### Filters\n\nLoad the filters inside whatever templates you are going to use them:\n\n {% load templateutils_filters %}\n\n#### currency\n\nReturns value represented as currency for the give locale.\n\nUsage:\n\n {{ value|currency }}\n\nFor example: Assuming value is `13`, `{{ value|currency }}` produces: `$13.00`\n\n#### integer\n\nReturns the given value as an int type.\n\nUsage:\n\n {{ value|int }}\n {% tag_that_requires_int value|int %}\n\n#### nolinebrs\n\nRemoves all `
` tags in the given string.\n\n#### startswith\n\nReturns whether the given value starts with the given string arg. The argument must be a string.\n\nUsage:\n\n {{ value|startsvith:\"arg\" }}\n\n#### creditcard\n\nHides parts of strings such as credit card or bank account numbers to show only the last amount of numbers. Default amount of numbers to show is **4**\n\nUsage:\n\n {{ value|creditcard:chars_to_show }}\n\nFor example: Assuming value is `\"5000000000003456\"`\n\n {{ value|creditcard:4 }}\n\nProduces:\n\n ************3456\n\n#### verbose\n\nReturns the verbose value of a ChoiceField.\n\nUsage:\n\n {{ form.field|display }}\n\nor\n\n {% for field in form %}\n {{ field|display }}\n {% endfor %}\n\nFor example: Assuming `field` is a `BooleanField` with `True`\n\n {{ field|display }}\n\nProduces: The string `Yes`",
"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/gerardo-orozco/django-template-utils",
"keywords": null,
"license": "BSD",
"maintainer": null,
"maintainer_email": null,
"name": "django-template-utils",
"package_url": "https://pypi.org/project/django-template-utils/",
"platform": "UNKNOWN",
"project_url": "https://pypi.org/project/django-template-utils/",
"project_urls": {
"Download": "UNKNOWN",
"Homepage": "https://github.com/gerardo-orozco/django-template-utils"
},
"release_url": "https://pypi.org/project/django-template-utils/0.1.1/",
"requires_dist": null,
"requires_python": null,
"summary": "Just a collection of useful template tags and filters gathered in a single app.",
"version": "0.1.1"
},
"last_serial": 1199878,
"releases": {
"0.1": [
{
"comment_text": "",
"digests": {
"md5": "6e219c7fb2007b00c061dfd2e4e4da7b",
"sha256": "0104916e9e20728b121e9efa31a6d00cedb5646cb7900724d54548272a56ab63"
},
"downloads": -1,
"filename": "django-template-utils-0.1.tar.gz",
"has_sig": false,
"md5_digest": "6e219c7fb2007b00c061dfd2e4e4da7b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 20667,
"upload_time": "2012-12-13T06:35:18",
"url": "https://files.pythonhosted.org/packages/dd/67/2dbbffeb2acc5c3743c8c326b51c6dbabdb9bca65a0a4df49966300dd402/django-template-utils-0.1.tar.gz"
}
],
"0.1.1": [
{
"comment_text": "",
"digests": {
"md5": "998642414cf7badb2640026893ec494e",
"sha256": "4be5e6c55d4ebff410ded3e38b87ed1bb9e6d64100e5248f955cb0988b075b51"
},
"downloads": -1,
"filename": "django-template-utils-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "998642414cf7badb2640026893ec494e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 20031,
"upload_time": "2014-08-23T20:38:05",
"url": "https://files.pythonhosted.org/packages/55/72/6e569ea32fe3b4260dd802c43718ce527e5329ecb45c5c34bbd0e65c8c60/django-template-utils-0.1.1.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "998642414cf7badb2640026893ec494e",
"sha256": "4be5e6c55d4ebff410ded3e38b87ed1bb9e6d64100e5248f955cb0988b075b51"
},
"downloads": -1,
"filename": "django-template-utils-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "998642414cf7badb2640026893ec494e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 20031,
"upload_time": "2014-08-23T20:38:05",
"url": "https://files.pythonhosted.org/packages/55/72/6e569ea32fe3b4260dd802c43718ce527e5329ecb45c5c34bbd0e65c8c60/django-template-utils-0.1.1.tar.gz"
}
]
}