@register.simple_tag
def get_comment_permalink(comment, anchor_pattern=None):
 if anchor_pattern:
  return comment.get_absolute_url(anchor_pattern)
 return comment.get_absolute_url()

@ register . simple_tag def get_comment_permalink ( comment , anchor_pattern = None ) : if anchor_pattern : return comment . get_absolute_url ( anchor_pattern ) return comment . get_absolute_url ( )
get the permalink for a comment .