A
A
AlexBoss2019-06-30 10:15:52
Django
AlexBoss, 2019-06-30 10:15:52

How can a string be split into substrings in django templates?

Good afternoon. How can a string be split into substrings by delimiter in django templates, similar to str|slice for slices?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew, 2019-06-30
@AlexBoss

You don't have to do it in the template, even if you really want to.
But if you are very stubborn, you can write a custom template tag .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question