===============================
Jinja2 Pluralize
===============================
.. image:: https://img.shields.io/pypi/v/jinja2_pluralize.svg?style=flat
:target: https://pypi.python.org/pypi/jinja2_pluralize
.. image:: https://travis-ci.org/audreyr/jinja2_pluralize.svg?branch=master
:target: https://travis-ci.org/audreyr/jinja2_pluralize
.. image:: https://api.codacy.com/project/badge/eb497c487012455688a62383afccccb7
:target: https://www.codacy.com/app/aroy/jinja2_pluralize
.. image:: https://img.shields.io/pypi/pyversions/jinja2_pluralize.svg?style=flat
.. image:: https://img.shields.io/pypi/status/jinja2_pluralize.svg?style=flat
Jinja2 pluralize filters.
* Free software: BSD license
* Documentation: http://jinja2-pluralize.readthedocs.org
Features
--------
1. Simple pluralize filter based on inflect.py. For example, this renders as `geese`:
.. code-block:: jinja
{{ 'goose'|pluralize }}
2. Django-style pluralize filter. Works as described in the `Django docs`_. For example, this renders as `votes`:
.. code-block:: jinja
vote{{ 0|pluralize }}
.. _`Django docs`: https://docs.djangoproject.com/en/dev/ref/templates/builtins/#pluralize
Usage
-----
To use it with Jinja2, update the `filters` dict on the environment like this:
.. code-block:: python
from jinja2 import Environment
from jinja2_pluralize import pluralize_dj
env = Environment()
env.filters['pluralize'] = pluralize_dj
tmpl = env.from_string('vote{{ 0|pluralize }}')
assert tmpl.render() == 'votes'
History
-------
0.3.0 (2015-10-09)
------------------
* Fix RST formatting on PyPI.
* Stable status.
* Test on Python 3.4 and 3.5.
* Add more badges to README.
0.2.1 (2014-07-09)
--------------------
* Remove the shebang from `__init__.py` (`#2`_), thanks to `@dashea`_.
.. _`#2`: https://github.com/audreyr/jinja2_pluralize/pull/2
.. _`@dashea`: https://github.com/dashea
0.2.0 (2014-07-02)
--------------------
* Package works as per the README.
0.1.0 (2014-04-25)
--------------------
* First release on PyPI.
Raw data
{
"_id": null,
"home_page": "https://github.com/audreyr/jinja2_pluralize",
"name": "jinja2_pluralize",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "Jinja2,filter,pluralize,Django,inflect",
"author": "Audrey Roy Greenfeld",
"author_email": "aroy@alum.mit.edu",
"download_url": "https://files.pythonhosted.org/packages/bb/1e/9d5a177fd1e4f74091743777518c432ad290c4630aac557b61087dffd6df/jinja2_pluralize-0.3.0.tar.gz",
"platform": "UNKNOWN",
"description": "===============================\nJinja2 Pluralize\n===============================\n\n.. image:: https://img.shields.io/pypi/v/jinja2_pluralize.svg?style=flat\n :target: https://pypi.python.org/pypi/jinja2_pluralize\n \n.. image:: https://travis-ci.org/audreyr/jinja2_pluralize.svg?branch=master\n :target: https://travis-ci.org/audreyr/jinja2_pluralize\n\n.. image:: https://api.codacy.com/project/badge/eb497c487012455688a62383afccccb7\n :target: https://www.codacy.com/app/aroy/jinja2_pluralize\n\n.. image:: https://img.shields.io/pypi/pyversions/jinja2_pluralize.svg?style=flat\n\n.. image:: https://img.shields.io/pypi/status/jinja2_pluralize.svg?style=flat\n\nJinja2 pluralize filters.\n\n* Free software: BSD license\n* Documentation: http://jinja2-pluralize.readthedocs.org\n\nFeatures\n--------\n\n1. Simple pluralize filter based on inflect.py. For example, this renders as `geese`:\n\n.. code-block:: jinja\n\n {{ 'goose'|pluralize }}\n\n2. Django-style pluralize filter. Works as described in the `Django docs`_. For example, this renders as `votes`:\n\n.. code-block:: jinja\n\n vote{{ 0|pluralize }}\n\n.. _`Django docs`: https://docs.djangoproject.com/en/dev/ref/templates/builtins/#pluralize\n\nUsage\n-----\n\nTo use it with Jinja2, update the `filters` dict on the environment like this:\n\n.. code-block:: python\n\n from jinja2 import Environment\n from jinja2_pluralize import pluralize_dj\n\n env = Environment()\n env.filters['pluralize'] = pluralize_dj\n tmpl = env.from_string('vote{{ 0|pluralize }}')\n assert tmpl.render() == 'votes'\n\n\n\n\n\nHistory\n-------\n\n0.3.0 (2015-10-09)\n------------------\n\n* Fix RST formatting on PyPI.\n* Stable status.\n* Test on Python 3.4 and 3.5.\n* Add more badges to README.\n\n0.2.1 (2014-07-09)\n--------------------\n\n* Remove the shebang from `__init__.py` (`#2`_), thanks to `@dashea`_.\n\n.. _`#2`: https://github.com/audreyr/jinja2_pluralize/pull/2\n.. _`@dashea`: https://github.com/dashea\n\n0.2.0 (2014-07-02)\n--------------------\n\n* Package works as per the README.\n\n0.1.0 (2014-04-25)\n--------------------\n\n* First release on PyPI.",
"bugtrack_url": null,
"license": "BSD",
"summary": "Jinja2 pluralize filters.",
"version": "0.3.0",
"project_urls": {
"Download": "UNKNOWN",
"Homepage": "https://github.com/audreyr/jinja2_pluralize"
},
"split_keywords": [
"jinja2",
"filter",
"pluralize",
"django",
"inflect"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4026e6a6d7741076ea1bcfac02821e744fc40fa4cbb07e870b7dd969f4af8721",
"md5": "00de73ef7f786b8c0de72c2a02373e17",
"sha256": "4fec874a591014774d4c66cb7f65314390731bfc57db4c27119db61aa93b2bc4"
},
"downloads": -1,
"filename": "jinja2_pluralize-0.3.0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "00de73ef7f786b8c0de72c2a02373e17",
"packagetype": "bdist_wheel",
"python_version": "3.4",
"requires_python": null,
"size": 4836,
"upload_time": "2015-10-09T07:29:03",
"upload_time_iso_8601": "2015-10-09T07:29:03.413472Z",
"url": "https://files.pythonhosted.org/packages/40/26/e6a6d7741076ea1bcfac02821e744fc40fa4cbb07e870b7dd969f4af8721/jinja2_pluralize-0.3.0-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "bb1e9d5a177fd1e4f74091743777518c432ad290c4630aac557b61087dffd6df",
"md5": "42afef9fd52c4768ab5d434f3f908cb4",
"sha256": "df5c2d5017b9b54c0a66cb790cca9fc08945837c3dbfc323589203f1ffb73c1c"
},
"downloads": -1,
"filename": "jinja2_pluralize-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "42afef9fd52c4768ab5d434f3f908cb4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 12638,
"upload_time": "2015-10-09T07:28:56",
"upload_time_iso_8601": "2015-10-09T07:28:56.133605Z",
"url": "https://files.pythonhosted.org/packages/bb/1e/9d5a177fd1e4f74091743777518c432ad290c4630aac557b61087dffd6df/jinja2_pluralize-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2015-10-09 07:28:56",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "audreyr",
"github_project": "jinja2_pluralize",
"travis_ci": true,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "inflect",
"specs": [
[
"==",
"0.2.4"
]
]
},
{
"name": "Jinja2",
"specs": [
[
"==",
"2.7.2"
]
]
}
],
"tox": true,
"lcname": "jinja2_pluralize"
}