Задать вопрос

Тел: +7 965 3737 888

484

Просмотров

0

Ответов

Hyperlink list filter

<p>This is a simple filter that takes an object list and returns a comma-separated list of hyperlinks. I use it to display the list of tags in my blog entries.</p>
<p>The function assumes the object has a get_absolute_url() method that returns the URL. In your template, write {{ obj_list|hyperlink_list:"slug" }} where obj_list is your object list and "slug" is the object's attribute that returns the link text.</p>

Вопрос полезен? Да0/Нет0
file_5147.py(1.3Кб)
None