Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
e3968df5
Kaydet (Commit)
e3968df5
authored
Nis 27, 2019
tarafından
Tobias Kunze
Kaydeden (comit)
Mariusz Felisiak
May 03, 2019
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Refs #20122 -- Corrected documentation of pluralize template filter.
üst
a9b88982
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
defaultfilters.py
django/template/defaultfilters.py
+2
-2
builtins.txt
docs/ref/templates/builtins.txt
+2
-2
No files found.
django/template/defaultfilters.py
Dosyayı görüntüle @
e3968df5
...
@@ -851,8 +851,8 @@ def filesizeformat(bytes_):
...
@@ -851,8 +851,8 @@ def filesizeformat(bytes_):
@register.filter
(
is_safe
=
False
)
@register.filter
(
is_safe
=
False
)
def
pluralize
(
value
,
arg
=
's'
):
def
pluralize
(
value
,
arg
=
's'
):
"""
"""
Return a plural suffix if the value is not 1
. By default, use 's' as the
Return a plural suffix if the value is not 1
, '1', or an object of
suffix:
length 1. By default, use 's' as the
suffix:
* If value is 0, vote{{ value|pluralize }} display "votes".
* If value is 0, vote{{ value|pluralize }} display "votes".
* If value is 1, vote{{ value|pluralize }} display "vote".
* If value is 1, vote{{ value|pluralize }} display "vote".
...
...
docs/ref/templates/builtins.txt
Dosyayı görüntüle @
e3968df5
...
@@ -1990,8 +1990,8 @@ If ``value`` is ``800-COLLECT``, the output will be ``800-2655328``.
...
@@ -1990,8 +1990,8 @@ If ``value`` is ``800-COLLECT``, the output will be ``800-2655328``.
``pluralize``
``pluralize``
-------------
-------------
Returns a plural suffix if the value is not
1. By default, this suffix is
Returns a plural suffix if the value is not
``1``, ``'1'``, or an object of
``'s'``.
length 1. By default, this suffix is
``'s'``.
Example::
Example::
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment