The code for something like this could be as follows
{{{
@register.filter(is_safe=False)
@stringfilter
def range(value):
"""
Returns a list the length of the value
Will cast a string to an int
"""
return list(range(int(value)))
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26361>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => assigned
* needs_better_patch: => 0
* owner: nobody => the-kid89
* needs_tests: => 0
* needs_docs: => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/26361#comment:1>
* status: assigned => closed
* type: Uncategorized => New feature
* resolution: => duplicate
Comment:
Duplicate of #13088. Please raise the idea on the DevelopersMailingList if
you want to revisit the "wontfix" decision.
--
Ticket URL: <https://code.djangoproject.com/ticket/26361#comment:2>