Is there a way to automatically detect links in Django templates?

I am listing some lists from a view in a django template. In this template, it will extract lines from these lists in sequence for loops, and then print each of these lines. Some of these lines may contain URLs, for example, Right now, when these lines print, they just print like text. Is there an easy way to tell the django template to automatically set these URLs and show them as links instead of plain text?This is some string. http://google.com

Thank!

+3
source share
1 answer

Try with urlize template tag.

+6
source

Source: https://habr.com/ru/post/1778475/


All Articles