Opened 4 years ago
Closed 4 years ago
#31647 closed New feature (wontfix)
Add "times" template filter.
Reported by: | Eray Erdin | Owned by: | nobody |
---|---|---|---|
Component: | contrib.humanize | Version: | 3.0 |
Severity: | Normal | Keywords: | template, humanize, filter, tag, tags |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Django's built-in humanize module/app already contains many useful filter tags.
https://docs.djangoproject.com/en/stable/ref/contrib/humanize/
However, it lacks a filter for converting integers to "once", "twice", "three times". Examples:
{{ 1|times }} {# once #} {{ 2|times }} {# twice #} {{ 3|times }} {# three times #}
Change History (1)
comment:1 by , 4 years ago
Component: | Template system → contrib.humanize |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
Summary: | "once", "twice", "three times" on humanize → Add "times" template filter. |
Note:
See TracTickets
for help on using tickets.
I don't think Django is going to add more built in template filters. It's really straightforward to add a custom one and there are lots of third-party libraries which can be developed more rapidly outside of Django.