Opened 6 years ago
Closed 6 years ago
#29432 closed Cleanup/optimization (fixed)
Allow passing an integer to the slice template filter
Reported by: | Maxim Danilov | Owned by: | nobody |
---|---|---|---|
Component: | Template system | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
or it should be:
def slice_filter(value, arg): arg = '%s' % arg .......
thats helped to use slice filter in loops with forloop.counter together.
Change History (4)
comment:1 by , 6 years ago
Summary: | templatefilter slice needs @stringfilter decorator. → templatefilter slice needs @stringfilter decorator for 'arg' variable. |
---|
comment:2 by , 6 years ago
comment:3 by , 6 years ago
Has patch: | set |
---|---|
Keywords: | templatefilter removed |
Summary: | templatefilter slice needs @stringfilter decorator for 'arg' variable. → Allow passing an integer to the slice template filter |
Triage Stage: | Unreviewed → Ready for checkin |
Type: | Bug → Cleanup/optimization |
Version: | → master |
Note:
See TracTickets
for help on using tickets.
Can you give the example code for the use case? Adding
@stringfilter
results in a test failure: