On Mar 24, 2006, at 1:48 PM, Rock wrote: > Is there a template filter for turning a large integer into a human > readable number? > > 1234567 --> 1,234,567 > 12345 --> 12,345 > > I don't think that python built-in formatting can do this. (Am I > wrong?)
Actually, locale.format will do it for you, IIRC. But there's not a Django filter for it (probably should be, though...) > Assuming there isn't already a simple filter that will do this, > what do > I need to learn about in order to create my own filter? You want the template language for Python programmers doc, and specificaly the part about writing filters: http:// www.djangoproject.com/documentation/templates_python/#writing-custom- template-filters Jacob --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---