|apnumber Filter

spells out one through nine, AP style.

Number As Markdown

Argument
None
Requires
{% load humanize %} and "django.contrib.humanize" in INSTALLED_APPS

Documentation

Follows the Associated Press style rule for numbers in prose: spell out one through nine, use figures for 10 and above.

Template

{% load humanize %}
<p>{{ 3|apnumber }} comments</p>
<p>{{ 42|apnumber }} comments</p>

Result

<p>three comments</p>
<p>42 comments</p>

Values outside one through nine are returned unchanged, so it is safe to apply to a whole column of numbers.

More Number Filters

All Number Filters


Did we get something wrong? Is there a use case for the apnumber filter that we should add? Please let us know.

Send Feedback

Official Documentation
This page last updated on August 20, 2026