Django

Code

Ticket #1684 (closed: fixed)

Opened 2 years ago

Last modified 2 years ago

[patch] Built-in "numerize" filter

Reported by: ubernostrum Assigned to: adrian
Milestone: Component: Template system
Version: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

It'd be handy to have a template filter which follows AP style guidelines for numbers -- if the number is 1-9, spell it out, otherwise print the number as digits.

Attachments

defaultfilters.diff (0.9 kB) - added by ubernostrum on 04/25/06 14:09:39.
patch against magic-removal to add 'numerize' filter
defaultfilters.2.diff (0.9 kB) - added by ubernostrum on 04/25/06 14:21:23.
No code change, but this one follows convention of referring to the arg as 'value'
defaultfilters.3.diff (0.9 kB) - added by ubernostrum on 04/25/06 14:22:10.
Yup. 'value'

Change History

04/25/06 14:09:39 changed by ubernostrum

  • attachment defaultfilters.diff added.

patch against magic-removal to add 'numerize' filter

04/25/06 14:09:56 changed by ubernostrum

  • summary changed from Built-in "numerize" filter to [patch] Built-in "numerize" filter.

04/25/06 14:17:57 changed by adrian

Rather than putting this in the default filters, we could add django.contrib.apstyle and fill it with other AP-isms like dateline-related stuff.

04/25/06 14:21:23 changed by ubernostrum

  • attachment defaultfilters.2.diff added.

No code change, but this one follows convention of referring to the arg as 'value'

04/25/06 14:22:10 changed by ubernostrum

  • attachment defaultfilters.3.diff added.

Yup. 'value'

06/03/06 20:03:49 changed by adrian

  • status changed from new to closed.
  • resolution set to fixed.

(In [3077]) Fixed #1684 -- Added apnumber template filter in django.contrib.humanize. Thanks, ubernostrum


Add/Change #1684 ([patch] Built-in "numerize" filter)




Change Properties
Action