summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorTobias Kunze <r@rixx.de>2019-04-27 18:08:39 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2019-05-03 11:53:56 +0200
commitbf9e0e342da3ed2f74ee0ec34e75bdcbedde40a9 (patch)
treec6c23e3341ec191cc27bbd84690aba7edc00be9c /django
parent2166fe337e54a47415b628267949fc1d86ab3246 (diff)
[2.2.x] Refs #20122 -- Corrected documentation of pluralize template filter.
Backport of e3968df527c4d378677f4784fb1bc0c86950fcf8 from master
Diffstat (limited to 'django')
-rw-r--r--django/template/defaultfilters.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/template/defaultfilters.py b/django/template/defaultfilters.py
index ae76910a37..f82c08348a 100644
--- a/django/template/defaultfilters.py
+++ b/django/template/defaultfilters.py
@@ -851,8 +851,8 @@ def filesizeformat(bytes_):
@register.filter(is_safe=False)
def pluralize(value, arg='s'):
"""
- Return a plural suffix if the value is not 1. By default, use 's' as the
- suffix:
+ Return a plural suffix if the value is not 1, '1', or an object of
+ length 1. By default, use 's' as the suffix:
* If value is 0, vote{{ value|pluralize }} display "votes".
* If value is 1, vote{{ value|pluralize }} display "vote".