djangosnippets.org: Latest snippets tagged with 'hyperlink'https://djangosnippets.org/tags/hyperlink/2008-01-03T17:34:36.015589-06:00Hyperlink list filter
2008-01-03T17:34:36.015589-06:00lifefloatsbyhttps://djangosnippets.org/snippets/535/<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 <code>get_absolute_url()</code> method that returns the URL. In your template, write <code>{{ obj_list|hyperlink_list:"slug" }} …</code></p>
Freely redistributable