@register.filter
def link(object):

    return '<a class="%s-icon" href="%s">%s</a>' % (object.__class__.__name__.lower(),
						    object.get_absolute_url(),
						    object)