slice Filter

Data Structure

Argument: slice (required) – the slice to return.

Documentation

Returns a slice of a sequence.

Variable

company = 'Webucator'

Template

{{ company|slice:'4:7' }}

Result

cat

Did we get something wrong? Is there a use case for the slice filter that we should add? Please let us know.

Send Feedback

Official Documentation
This page last updated on April 14, 2020, 5:54 p.m. EST