mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Fixed #6392 -- Made django.contrib.humanize template tags locale aware. Thanks, Dave McLain.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16168 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
7dd72360a2
commit
8f3e1c1c63
7 changed files with 207 additions and 49 deletions
|
@ -43,6 +43,12 @@ Examples:
|
|||
* ``450000`` becomes ``450,000``.
|
||||
* ``4500000`` becomes ``4,500,000``.
|
||||
|
||||
:ref:`Format localization <format-localization>` will be respected if enabled,
|
||||
e.g. with the ``'de'`` language:
|
||||
|
||||
* ``45000`` becomes ``'45.000'``.
|
||||
* ``450000`` becomes ``'450.000'``.
|
||||
|
||||
You can pass in either an integer or a string representation of an integer.
|
||||
|
||||
.. templatefilter:: intword
|
||||
|
@ -61,6 +67,13 @@ Examples:
|
|||
|
||||
Values up to 1000000000000000 (one quadrillion) are supported.
|
||||
|
||||
:ref:`Format localization <format-localization>` will be respected if enabled,
|
||||
e.g. with the ``'de'`` language:
|
||||
|
||||
* ``1000000`` becomes ``'1,0 Million'``.
|
||||
* ``1200000`` becomes ``'1,2 Million'``.
|
||||
* ``1200000000`` becomes ``'1,2 Milliarden'``.
|
||||
|
||||
You can pass in either an integer or a string representation of an integer.
|
||||
|
||||
.. templatefilter:: naturalday
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue