summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2006-06-04 01:03:48 +0000
committerAdrian Holovaty <adrian@holovaty.com>2006-06-04 01:03:48 +0000
commitb8fd9a44e5a00ec1a3e857cd20442ec2572335d0 (patch)
treec06a884004565aa67e270221cd006ae020394cbb /docs
parentfb537e177d7d304d6642ee6005258a82584a8032 (diff)
Fixed #1684 -- Added apnumber template filter in django.contrib.humanize. Thanks, ubernostrum
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3077 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/add_ons.txt26
1 files changed, 20 insertions, 6 deletions
diff --git a/docs/add_ons.txt b/docs/add_ons.txt
index bcc2f50a7f..9f5dc640da 100644
--- a/docs/add_ons.txt
+++ b/docs/add_ons.txt
@@ -53,16 +53,17 @@ To activate these filters, add ``'django.contrib.english'`` to your
``INSTALLED_APPS`` setting. Once you've done that, use ``{% load english %}``
in a template, and you'll have access to these filters:
-ordinal
--------
+apnumber
+--------
-Converts an integer to its ordinal as a string.
+For numbers 1-9, returns the number spelled out. Otherwise, returns the
+number. This follows Associated Press style.
Examples:
- * ``1`` becomes ``'1st'``.
- * ``2`` becomes ``'2nd'``.
- * ``3`` becomes ``'3rd'``.
+ * ``1`` becomes ``'one'``.
+ * ``2`` becomes ``'two'``.
+ * ``10`` becomes ``10``.
You can pass in either an integer or a string representation of an integer.
@@ -96,6 +97,19 @@ Values up to 1000000000000000 (one quadrillion) are supported.
You can pass in either an integer or a string representation of an integer.
+ordinal
+-------
+
+Converts an integer to its ordinal as a string.
+
+Examples:
+
+ * ``1`` becomes ``'1st'``.
+ * ``2`` becomes ``'2nd'``.
+ * ``3`` becomes ``'3rd'``.
+
+You can pass in either an integer or a string representation of an integer.
+
flatpages
=========