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 youve done that, use{% load humanize %} in a template, and youll have access to the following filters.
For numbers 1-9, returns the number spelled out. Otherwise, returns the number. This follows Associated Press style.
Examples:
You can pass in either an integer or a string representation of an integer.
Converts an integer to a string containing commas every three digits.
Examples:
Format localization will be respected if enabled, e.g. with the 'de' language:
You can pass in either an integer or a string representation of an integer.
Converts a large integer to a friendly text representation. Works best for numbers over 1 million.
Examples:
Values up to 10^100 (Googol) are supported.
Format localization will be respected if enabled, e.g. with the 'de' language:
You can pass in either an integer or a string representation of an integer.
For dates that are the current day or within one day, return today, tomorrow or yesterday, as appropriate. Otherwise, format the date using the passed in format string.
Argument: Date formatting string as described in the date tag.
Examples (when today is 17 Feb 2007):
For datetime values, returns a string representing how many seconds, minutes or hours ago it was falling back to thetimesince format if the value is more than a day old. In case the datetime value is in the future the return value will automatically use an appropriate phrase.
Examples (when now is 17 Feb 2007 16:30:00):
Converts an integer to its ordinal as a string.
Examples:
You can pass in either an integer or a string representation of an integer.
Product: DataEase for Windows 7.x. Written by George Washington 11/04/14 at 08:26:17
Product: DataEase 8 Reporter. Written by eduardo paez 02/05/14 at 14:40:11
Product: . Written by Marco Marchesi 15/02/16 at 14:50:46
Product: . Written by Grossi Gioacchino 18/11/19 at 14:33:44
Product: Dataease [{8}]FIVE. Written by Rainer 22/03/21 at 11:13:10
Product: Dataease [{8}]FIVE. Written by Rainer 08/06/21 at 14:12:40