Y
Y
YuriyCherniy2020-04-15 23:42:34
Django
YuriyCherniy, 2020-04-15 23:42:34

Is there a filter in Django templates to deal with string slices?

truncatecharsdoes not fit, need to trim +in the phone number. Or should I write my own? It is somehow strange that there is a slice for lists, but nothing for strings. Poke your nose if you overlooked.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dr. Bacon, 2020-04-16
@YuriyCherniy

"Somewhat strange", but slice works with strings.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question