Is there a Tag in Django to show part of the text?

0

I would like to know if there is any tag to show part of a description

{{ post.description | tag-aqui }}
    
asked by anonymous 07.07.2017 / 20:29

1 answer

1

Since the intention is only to limit the number of characters, just use the filter slice :

{{ post.description | slice:"0:255" }}

This will display the characters in the positions between 0 and 255.

Official Documentation

    
07.07.2017 / 20:55