python - Truncatewords by percentage of total words count -


How can the text area be reduced according to the words based on the counting of words?

For example {{post.content | truncatewords_by_percents: "20%"}}

Custom template tag built-in template tags only characters or See the documentation that allows transcription by words.

Comments

Popular posts from this blog

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -

jasper reports - How to center align barcode using jasperreports and barcode4j -

django - CommandError: You must set settings.ALLOWED_HOSTS if DEBUG is False -