django.contrib.humanize
django.contrib.humanize
A set of Django template filters useful for adding a “human touch” to data.
To activate these filters, add 'django.contrib.humanize'
to your INSTALLED_APPS
setting. Once you’ve done that, use {% load humanize %}
in a template, and you’ll have access to the following filters.
apnumber
For numbers 1-9, returns the number spelled out. Otherwise, returns the number. This follows Associated Press style.
Examples:
-
1
becomesone
. -
2
becomestwo
. -
10
becomes10
.
You can pass in either an integer or a string representation