Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#8557 closed (duplicate)

intpoint filter for contrib.humanize

Reported by: drakkan Owned by: nobody
Component: Template system Version: master
Severity: Keywords:
Cc: Triage Stage: Design decision needed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


for european users would be really useful an intpoint filter in contrib.humanize,

here is the necessary code (similar to intcomma)

def intpoint(value):

Converts an integer to a string containing point every three digits.
For example, 3000 becomes '3.000' and 45000 becomes '45.000'.
orig = force_unicode(value)
new = re.sub("(-?\d+)(\d{3})", '\g<1>.\g<2>', orig)
if orig == new:

return new


return intpoint(new)

intpoint.is_safe = True

hope this would be in 1.0,


Change History (5)

comment:1 Changed 8 years ago by Jacob

milestone: 1.0
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

We're well past feature freeze for 1.0.

comment:2 Changed 8 years ago by Ivan Giuliani

milestone: post-1.0

comment:3 Changed 8 years ago by Chris Beaven

Triage Stage: UnreviewedDesign decision needed

comment:4 Changed 8 years ago by Chris Beaven

Resolution: duplicate
Status: newclosed

See #9037 (it has a patch)

comment:5 Changed 8 years ago by (none)

milestone: post-1.0

Milestone post-1.0 deleted

Note: See TracTickets for help on using tickets.
Back to Top